TapConnectSDK is an iOS SDK that provides seamless integration with Tap Connect for financial account connection. Built on React Native, it offers a native Swift API for easy integration into any iOS application.
- ✅ Simple Swift API
- ✅ Delegate-based callbacks
- ✅ Multi-language support (English, Arabic)
- ✅ Theme support (Light, Dark)
- ✅ Embedded React Native frameworks
- ✅ No external dependencies required
- iOS 13.0+
- Swift 5.0+
- Xcode 12.0+
Add the following to your Podfile:
pod 'TapConnectSDK', :path => 'path/to/TapConnectSDK'Then run:
pod install- Copy the
TapConnectSDKfolder to your project - Drag and drop the three frameworks into your Xcode project:
ConnectSdkFramework.xcframeworkReactBrownfield.xcframeworkhermes.xcframework
- Add the SDK source files from
TapConnectSDK/Classes/to your project
First, initialize the SDK in your AppDelegate:
import UIKit
import TapConnectSDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Initialize TapConnectSDK
TapConnectSDK.setup(launchOptions: launchOptions)
return true
}
}Implement TapConnectSDKDelegate in your view controller:
import UIKit
import TapConnectSDK
class ViewController: UIViewController {
@IBAction func openConnectTapped(_ sender: UIButton) {
// Configure SDK
let config = TapConnectSDKConfig(
language: .english,
theme: .light,
token: "your_optional_token"
)
// Present SDK
TapConnectSDK.shared.present(
from: self,
config: config,
delegate: self
)
}
}
// MARK: - TapConnectSDKDelegate
extension ViewController: TapConnectSDKDelegate {
func tapConnectDidComplete(authId: String, bi: String) {
print("✅ Connection completed!")
print("Auth ID: \(authId)")
print("BI: \(bi)")
// Handle successful connection
// Navigate to next screen, save data, etc.
}
func tapConnectDidError(message: String) {
print("❌ Error: \(message)")
// Show error alert to user
let alert = UIAlertController(
title: "Error",
message: message,
preferredStyle: .alert
)
alert.addAction(UIAlertAction(title: "OK", style: .default))
present(alert, animated: true)
}
func tapConnectDidNotFindAccount() {
print("⚠️ No account found")
// Handle no account scenario
// Show onboarding, registration, etc.
}
func tapConnectDidClose() {
print("🚪 User closed Connect")
// Handle user dismissal
}
}let config = TapConnectSDKConfig(language: .english) // or .arabiclet config = TapConnectSDKConfig(theme: .light) // or .darklet config = TapConnectSDKConfig(
language: .arabic,
theme: .dark,
token: "user_auth_token_here"
)let config = TapConnectSDKConfig(
language: .english,
theme: .light,
token: "token",
additionalParams: [
"customKey": "customValue",
"userId": 12345
]
)You can dismiss the SDK programmatically if needed:
TapConnectSDK.shared.dismiss(animated: true)setup(launchOptions:)- Initialize the SDK (call in AppDelegate)shared- Singleton instance
present(from:config:delegate:)- Present the Connect UIdismiss(animated:)- Dismiss the Connect UI programmatically
Configuration object for SDK initialization.
Properties:
language: TapConnectLanguage- UI language (.english or .arabic)theme: TapConnectTheme- UI theme (.light or .dark)token: String?- Optional authentication tokenadditionalParams: [String: Any]?- Additional configuration parameters
Protocol for receiving callbacks from the SDK.
Methods:
tapConnectDidComplete(authId:bi:)- Called on successful completiontapConnectDidError(message:)- Called when an error occurstapConnectDidNotFindAccount()- Called when no account is foundtapConnectDidClose()- Called when user closes the UI
The SDK includes three main frameworks:
- ConnectSdkFramework.xcframework - Core React Native bundle with Connect UI
- ReactBrownfield.xcframework - React Native brownfield integration layer
- hermes.xcframework - Hermes JavaScript engine for React Native
See the TestConnectSDK Xcode project for a complete working example.
Make sure all three frameworks are properly embedded in your app:
- Select your target in Xcode
- Go to "Frameworks, Libraries, and Embedded Content"
- Ensure all three frameworks are set to "Embed & Sign"
If you see "Failed to load ConnectSdkFramework bundle", ensure:
- The framework bundle identifier is
tap.ConnectSdkFramework - The framework is properly copied to your app bundle
- You called
TapConnectSDK.setup()in AppDelegate
Clean and rebuild your project:
# Clean build folder
cmd + shift + K
# Or via terminal
xcodebuild clean -workspace YourApp.xcworkspace -scheme YourSchemeMIT License - See LICENSE file for details
For issues or questions, contact: [email protected]