Overview
The Cloud Card iOS SDK provides APIs for:- Card provisioning and registration
- Retrieving locally stored cards
- Generating EMV QR codes
- Reading token inventory and usage summaries
- Accessing locally cached transactions
CloudCardWrapper.
Installation
CloudCard is distributed as an XCFramework through Sudo Africa’s protected artifact repository.
Requirements
- iOS 13.0+
- Xcode 15+
- CocoaPods
- Physical iPhone recommended for payment testing
SDK Repository Authentication
You need repository credentials from Sudo Africa before installation..env:
.netrc file when installing:
Do not commit
.env, .netrc, or SDK credentials to source control.Environments
The SDK supports two environments:truefor sandboxfalsefor production
Initialization
Initialize the SDK once during app startup before calling any other Cloud Card API.true for sandbox and false for production.
Register a Card
Provisioning data must come from your backend after the user is authenticated. The client app should not generate provisioning credentials locally. Typical payload values include:walletIdaccountIdpaymentAppInstanceIdsecretjwtToken
Retrieve Cards
Token Summary
Use token summary to monitor the current token balance and refresh state after provisioning or payment activity.Retrieve Saved Transactions
- ATC
- Amount
- Timestamp
Generate EMV QR
Common Issues
Authentication Failure During Installation
Check:SUDO_USERis setSUDO_PASSWORDis set- Credentials are valid
.netrcis configured correctly
Works on Device but Fails on Simulator
If the XCFramework only includesios-arm64, simulator builds will fail. Use a physical iPhone or request a simulator-compatible XCFramework.
Registration Succeeds but No Cards Are Returned
Verify:- SDK environment matches backend environment
walletIdandaccountIdare correct- registration returned success
- stored cards are active
QR Generation Fails
Check:- there is an active card on the device
- token inventory is not depleted
- the amount format is valid
- SDK environment matches the provisioning environment
Best Practices
- Initialize the SDK once during app startup
- Use a stable device identifier for
paymentAppInstanceId - Fetch provisioning data from a secure backend endpoint
- Avoid logging secrets or JWTs in production
- Refresh cards and token summary after provisioning or payment events
