Connect iOS SDK

The Connect iOS SDK allows you to embed our Finicity Connect application anywhere you want within your own mobile applications.

Compatibility

  • Supports iOS 11 or later

Install the SDK

Install the Connect iOS SDK using CocoaPods Support or by manually dragging Connect.xcframework into your Xcode project. 

CocoaPods

To install the SDK include the following in your Podfile.

Sample
 use_frameworks!

pod 'FinicityConnect'
Manual

  1. Open your project in Xcode and drag the Connect.xcframework folder into your project.
  2. In the build settings for the target folder, select the General tab. 
  3. Scroll down to the Frameworks, Libraries, and Embedded Content section, and select Connect.xcframework.
  4. Under the Embed column, select Embed & Sign from the menu drop-down list if it’s not already selected. 

Create Callback Functions

Create callback functions for loaded, done, cancel, and error events. These callbacks correspond to events in Connect’s data flow.

Sample
 func connectLoaded() {
self.connectNavController = UINavigationController(rootViewController: self.connectViewController)
self.connectNavController.modalPresentationStyle = .fullScreen
self.present(self.connectNavController, animated: false)
}
Callbacks
loaded
Called when the Connect web page is loaded and ready to display.
doneCalled when the user successfully completes the Connect application. It also has an unlabeled NSDictionary? parameter containing event information.
cancelCalled when the user cancels the Connect application.
errorCalled when an error occurs while the user is using the Connect application. The unlabeled NSDictionary? parameter contains event information.
routeCalled with the user is navigating through the screens of the Connect application. The unlabeled NSDictionary? parameter containing event information.
userConnect 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.

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 Links.

  • 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. 

Sample
 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
}

Migrate From Framework to XCFramework

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.

See 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.
  2. Open your project in Xcode.
  3. Click the General tab.
  4. Scroll down to the Frameworks, Libraries, and Embedded Content section.
  5. Select connect.framework.
  6. To delete the 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)
    Note: 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.

Step 4—Add Connect iOS SDK to your project run