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.
Install the SDKs
The iOS SDK supports:- iOS 13.0+
- macOS 12.5+
- Xcode 14.1+
CocoaPods (recommended)
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:Terminal
How to install Homebrew in MacOS:
Link
Podfile:
Podfile
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.stringsSwift
Theme
provide with a JSON file CirclePWTheme.jsonSwift
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