Your CocoaPod includes:
- TapConnectSDK.swift - Main SDK interface
- TapConnectSDKDelegate.swift - Delegate protocol for callbacks
- TapConnectSDKConfig.swift - Configuration model
- 3 Frameworks: ConnectSdkFramework, ReactBrownfield, hermes
Add to your Podfile:
pod 'TapConnectSDK', :path => 'path/to/TapConnectSDK'Run:
pod installimport TapConnectSDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Add this single line
TapConnectSDK.setup(launchOptions: launchOptions)
return true
}
}import TapConnectSDK
class MyViewController: UIViewController, TapConnectSDKDelegate {
func showConnect() {
let config = TapConnectSDKConfig(
language: .english,
theme: .light
)
TapConnectSDK.shared.present(
from: self,
config: config,
delegate: self
)
}
// Handle callbacks
func tapConnectDidComplete(authId: String, bi: String) {
print("Success: \(authId)")
}
func tapConnectDidError(message: String) {
print("Error: \(message)")
}
func tapConnectDidNotFindAccount() {
print("No account found")
}
func tapConnectDidClose() {
print("User closed")
}
}You now have a fully functional Tap Connect integration.
let config = TapConnectSDKConfig(language: .arabic) // or .englishlet config = TapConnectSDKConfig(theme: .dark) // or .lightlet config = TapConnectSDKConfig(
language: .english,
theme: .light,
token: "your_auth_token"
)let config = TapConnectSDKConfig(
language: .english,
theme: .light,
token: "token",
additionalParams: [
"userId": "12345",
"customField": "value"
]
)Solution: Clean build folder (⌘⇧K) and rebuild
Solution: Make sure you called TapConnectSDK.setup() in AppDelegate
Solution:
- Go to your target settings
- Navigate to "Frameworks, Libraries, and Embedded Content"
- Set all three frameworks to "Embed & Sign"
- See
README.mdfor full documentation - Check
Example.swiftfor code samples - Contact: developer@tap.company
- ✅ Always call
TapConnectSDK.setup()in AppDelegate - ✅ Implement all 4 delegate methods
- ✅ Pass your ViewController when calling
present() - ✅ Configure language and theme as needed
- ✅ Handle all callback scenarios appropriately
- iOS 13.0+
- Swift 5.0+
- Xcode 12.0+
Happy Coding! 🎉