Skip to main content
The Circle iOS SDK enables user-controlled wallets within your mobile application. Three authentication methods are supported, namely social logins, email, or PIN, which includes security questions for recovery. This allows you to authenticate your users in a seamless way and create user-controlled wallets for them. By integrating this client-side SDK, your users can securely create wallets and make transactions using social accounts or email. If you choose the PIN authentication method, your users can input sensitive data, like PINs or security answers, in a secure way. Moreover, the SDK encrypts the request body sent by the application, protecting your users’ information.
Note:The Web and Mobile SDKs preserve the user keyshare with the individual, giving them complete control. You must use the SDKs with the user-controlled wallet product. Additionally, the Web and Mobile SDKs support only the user-controlled wallet product.
At Circle, we understand the importance of end-to-end security for your application and the need to create a tailored and seamless user experience for your end-users. Hence, Circle’s SDK also exposes functionality for you to customize the description and layout. See the iOS SDK UI customization API article about customizing the SDK.

Install the SDKs

The iOS SDK supports:
  1. iOS 13.0+
  2. macOS 12.5+
  3. Xcode 14.1+
*Earlier versions are not supported. CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
Terminal
How to install Homebrew in MacOS: Link
To integrate into your Xcode project using CocoaPods, specify it in your Podfile:
Podfile
Then, run the following command:
Terminal

Manual

You can also manually set up the iOS SDK by downloading it from GitHub: circlefin/w3s-ios-sdk.

SDK architecture

You must use Web, iOS, or Android SDKs to access the user-controlled Programmable Wallet product. The SDK secures, manages, and communicates with your server to ensure your user’s keyshare, always stays with them and is not exposed to your servers. To learn more, see How it works.

SDK API references

WalletSdk

WalletSdk.Configuration

public struct Configuration

SettingsManagement

Swift
💡 Notice:Important: In any app that uses biometrics, include the NSFaceIDUsageDescription key in the app’s Info.plist file. Without this key, the system won’t allow your app to use biometrics (Face ID).

ExecuteCompletion

Swift

ExecuteCompletionStruct

Swift
  • When receiving an error or warning, we will not close the current page by default.
  • You will get the onErrorController in the callback, and then you can decide to dismiss/push the page by your error-handling strategy.

ExecuteResult

Swift

ChallengeType

Swift

ChallengeStatus

Swift

ExecuteResultData

Swift

ExecuteWarning

Swift

WarningType

Swift

LoginCompletion

Swift

LoginCompletionStruct

Swift

LoginResult

Swift

OauthInfo

OauthInfo for Social login
sw

SocialUserInfo

SocialUserInfo for Social login
Swift

LogoutCompletion

Swift

ApiError

public struct ApiError

ApiError.ErrorCode

public enum
Enum Cases

SocialProvider

Specify a social provider to operate on. See WalletSdk.performLogin and WalletSdk.performLogout.
Swift

WalletSdkLayoutProvider

Set WalletSdkLayoutProvider for layout customization.
Swift

SecurityQuestion

public struct SecurityQuestion

SecurityQuestion.InputType

public enum InputType
Enum Cases

SecurityConfirmItem

public struct SecurityConfirmItem

ImageStore

public struct ImageStore

ImageStore.Img

public enum Img
Enum Cases

WalletSdkDelegate

Methods for managing CircleProgrammableWalletSDK process and customizing controllers.
Swift

ErrorMessenger

Define the customized error description. All error codes are listed in ApiError.ErrorCode.
Swift

Static Resources

Localized String

Provide with a strings file CirclePWLocalizable.strings
Swift

Theme

provide with a JSON file CirclePWTheme.json
Swift

ThemeConfig

public struct ThemeConfig

ThemeFontConfig

public struct ThemeFontConfig

ThemeColorConfig

public struct ThemeColorConfig (see Color Reference)

Sample Code

Set endpoint

Swift

Set endpoint and enable biometrics

Swift

Execute

Swift

Set Biometrics Pin

Swift

WalletSdkLayoutProvider

Swift

Set Error Messages

Swift

Confirm the delegate for customizing the UI

Swift

PerformLogin Flow

Swift

VerifyOTP flow

Swift

PerformLogout Flow

Swift
See our sample app guides.