Connect iOS SDK
The Connect iOS SDK allows you to embed our Finicity Connect application anywhere you want within your own mobile applications.
The iOS SDK uses the XCFramework format which allows you to more easily integrate our SDK into your development projects. Our iOS SDK has full bitcode support so that you don’t have to disable bitcode in your applications when integrating with our SDK.
The XCFramework format is Apple’s officially supported format for distributing binary libraries for multiple platforms and architectures in a single bundle.
Unlike framework, the XCFramework doesn’t require you to strip out the simulator X86 binary library from your bundle before submitting your apps to the Apple App Store.
Note: If you’re already using connect-sdk-iOS-v1.2.0.zip (framework) and you want to upgrade to connect-sdk-iOS-v1.3.0.zip (XCFramework) you’ll need to do a few steps to migrate your projects from framework to XCframework. See Migrate from framework to XCFramework.
See also:
- 1—Add the iOS SDK to your project
- 2—Create callback functions
- 3—Create a ConnectViewConfig Object and ConnectViewController Class
Download SDK File
Migrate from framework to XCFramework
Step 1 – Delete Connect.framework from your project
If you’re currently using framework in your projects, then you need to remove it before you start using the XCFramework. This ensures that the connect.framework won’t interfere with the new XCFramework while you’re trying to compile your source code.
Caution: Before deleting your existing framework, test the new XCFramework, and make sure it is working correctly so that you don’t accidentally delete your source files.
- 1.
Download the Connect iOS SDK and upzip the file.
- 2.
Open your project in Xcode.
- 3.
Click the General.
- 4.
Scroll down to the section: Frameworks, Libraries, and Embedded Content.
- 5.
Select connect.framework.
- 6.
To delete framework, click (–) minus.
Step 2 – Remove the Connect.framework Reference
- 1.
From Project Navigator on the left pane, select framework and press Delete.
- 2.
Click Remove Reference (recommended).
This is the safest option to preserve your source files.
Step 3 – Remove Run Script
If you’ve incorporated our script for stripping out the X86 simulator before submitting your application to the Apple App Store, you can remove the run script. It’s no longer needed with the XCFramework.
Note: Only customers that created a run script to incorporate with the connect-sdk-iOS-v1.2.0.zip need to do this step.
- 1.
From Xcode in the right pane, select your Targets.
- 2.
On the Build Phase tab, scroll down to Run Script.
- 3.
To remove the script, click the x.
1 — Add the Connect iOS SDK to your project
- Download Connect iOS SDK
- Unzip the SDK file and open your project in Xcode.
• connect-sdk-iOS-v1.3.0.zip (sha256) - In the Project Navigator pane, drop the Connect.xcframework folder (from the SDK zip file) into the Frameworks folder.
- From the Xcode right pane, select your Targets build.
- On the General tab, scroll down to the Frameworks, Libraries, and Embedded Content, and select Connect.xcframework.
- Under the Embed column, select Embed & Sign from the menu list.
- Add import Connect into all your source files that make calls to the iOS SDK.
2 — Create callback functions
Create callback functions for loaded, done, cancel, and error events. These callbacks correspond to events in Connect’s data flow.
func connectLoaded() {
self.connectNavController = UINavigationController(rootViewController: self.connectViewController)
self.connectNavController.modalPresentationStyle = .fullScreen
self.present(self.connectNavController, animated: false)
}
loaded | Called when the Connect web page is loaded and ready to display. |
done | Called when the user successfully completes the Connect application. It also has an unlabeled NSDictionary? parameter containing event information. |
cancel | Called when the user cancels the Connect application. |
error | Called when an error occurs while the user is using the Connect application. The unlabeled NSDictionary? parameter contains event information. |
route | Called with the user is navigating through the screens of the Connect application. The unlabeled NSDictionary? parameter containing event information. |
user | Connect 2.0 (only) Called when a user performs an action. User events provide visibility into what action a user could take within the Connect application. The unlabeled NSDictionary? parameter contains event information. |
3 — Create a ConnectViewConfig Object and ConnectViewController Class
- 1.
Using a valid Connect URL and callback functions, create a ConnectViewConfig object.
See Generate 2.0 Connect URL APIs. - 2.
Create an instance of the ConnectViewController class, providing the ConnectViewConfig class when calling its load method.
- 3.
In the loaded callback, present the ConnectViewController using a UINavigationController with the ConnectViewcontroller as its rootViewController.
- 4.
The ConnectViewController automatically dismisses when the Connect flow is completed, canceled early by the user, or when an error occurred.
func openConnect(url: String) {
let config = ConnectViewConfig(connectUrl: url, loaded: self.connectLoaded, done: self.connectDone, cancel: self.connectCancelled, error: self.connectError, route: self.connectRoute, userEvent: self.connectUserEvent)
self.connectViewController = ConnectViewController()
self.connectViewController.load(config: config)
}
func connectLoaded() {
self.connectNavController = UINavigationController(rootViewController: self.connectViewController)
self.connectNavController.modalPresentationStyle = .fullScreen
self.present(self.connectNavController, animated: false)
}
func connectDone(_ data: NSDictionary?) {
// Connect flow completed
}
func connectCancelled() {
// Connect flow exited prematurely
}
func connectError(_ data: NSDictionary?) {
// Error encountered in Connect flow
}
func connectRoute(_data: NSDictionary?) {
// Connect route changed
}
func connectUserEvent(_ data: NSDictionary?) {
// Connect user event fired in response to user action
}