Installation
Swift Package Manager (Recommended)
Add ZeroSettleKit to your Xcode project using Swift Package Manager:1
Open your Xcode project
Open your iOS app project in Xcode.
2
Add package dependency
- Go to File → Add Package Dependencies…
- Enter the package URL:
- Click Add Package
3
Select target
Choose your app target and click Add Package
Minimum Requirements
- iOS 15.0+
- Swift 5.7+
- Xcode 14.0+
Basic Usage
1. Import the Framework
2. Show the Prebuilt Deposit View
The fastest way to start accepting deposits is using the prebuiltZSDepositView:
- Payment method selection (Apple Pay, Phantom, MetaMask, Coinbase Wallet)
- Amount input (2, 5, $10, or custom)
- Transaction submission
- Real-time status updates
- Error handling
3. Test the Integration
Build and run your app, then tap the button that shows the deposit view. You’ll see:- Payment method options (Apple Pay, Phantom, MetaMask, Coinbase Wallet)
- Preset amount buttons (2, 5, $10) or custom amount input
- A deposit button
- Real-time transaction status
What’s Next?
ZeroSettle Deposit View
Learn about all the options for the prebuilt deposit UI
ZeroSettle Deposit API
Build custom deposit UIs with full control over the flow
Payment Methods
Understand how Apple Pay, Phantom, MetaMask, and Coinbase Wallet work
Error Handling
Handle errors gracefully and provide great UX
Getting Your Wallet Address
You need a wallet address to receive USDC deposits. ZeroSettle supports both Solana and Ethereum/Base addresses:Solana Address (for Phantom)
Solana Address (for Phantom)
- Download Phantom wallet
- Create or import a wallet
- Tap your wallet name at the top
- Tap “Copy Address”
- Use this address - it looks like:
7xKXtg2CW87d97TXJSDpbD5jBkhe...
Ethereum/Base Address (for Apple Pay, MetaMask, Coinbase)
Ethereum/Base Address (for Apple Pay, MetaMask, Coinbase)
- Download MetaMask or Coinbase Wallet
- Create or import a wallet
- Copy your wallet address
- Use this address - it starts with
0xlike:0x742d35Cc6634C0532925a3b844...
Common Issues
Module 'ZeroSettleKit' not found
Module 'ZeroSettleKit' not found
Solution: Make sure you’ve added the Swift package dependency and selected your app target. Clean and rebuild your project (Cmd+Shift+K, then Cmd+B).
Invalid wallet address error
Invalid wallet address error
Solution: Make sure you’re using a valid address format:
- Solana: Base58-encoded, 32-44 characters (e.g.,
7xKXtg2CW87...) - Ethereum/Base: Hex string starting with
0x, 42 characters (e.g.,0x742d35Cc...)
Phantom/MetaMask not opening
Phantom/MetaMask not opening
Solution: Test on a physical device, not the simulator. Wallet apps don’t work in the iOS Simulator. Make sure the wallet app is installed.
Apple Pay not showing
Apple Pay not showing
Solution:
- Test on a physical device with an Apple Pay-enabled card
- Ensure your Apple Developer account has Apple Pay entitlements
- Add the Apple Pay capability to your app target in Xcode
- Make sure you’re in a supported region
Amounts not updating correctly
Amounts not updating correctly
Solution: Remember all amounts are in cents, not dollars:
- 100 cents = $1.00
- 500 cents = $5.00
- To display:
"$\(Double(cents) / 100.0, specifier: "%.2f")"
Example Project
Want to see a complete working example? Check out the ZeroSettleKit Example App on GitHub. The example project demonstrates:- ✅ Basic deposit flow
- ✅ Custom deposit UI
- ✅ Error handling
- ✅ Transaction tracking
- ✅ All payment methods
Need help? Reach out to us at [email protected] or check the GitHub Discussions.
