Getting Started


The minimum iOS version is iOS 12.

The latest SDK version can be found here

The library can be integrated to iOS projects using diffrect ways:

1. Swift Package Manager (SPM)

  • Go to your project → Package Dependencies tab.

  • Click the + sign to add a new package.

  • Add the following SPM dependency URL:

2. CocoaPods

  • If it is the first time to add a CocoaPod to your project, then you should follow this official tutorial to install CocoaPods.

  • Add this pod to your project’s podfile pod 'FunnelConnectSDK', or you can specify an explicit version pod 'FunnelConnectSDK', 'LATEST_VERSION'

  • Install the pod:

    pod install

If for some reason you got an error saying that the latest version is not found, please try to update the SDK pod using this command pod update FunnelConnectSDK Please make sure that you have the latest stable version.

3. Binary framework

  • Head to this Repo.
  • Download this file FunnelConnectSDK.xcframework.
  • Drag and drop it to your project.
  • Make sure you always have the latest stable update of the framework.

Please make sure that you have the latest stable version.

If you have a MAC with an Apple silicon processor, then you will need to do the following additional steps

  1. Go to Targets section, select each target and navigate to Build Settings tab, and do the following:
  2. Search for Excluded Architectures.
  3. Add a new item under Debug and Release and choose this option Any iOS Simulator SDK the set its value to arm64

Initializing the library

Basic initializing

Once integrated into your app, you can simply call the SDK initializer in the main class of your application.

This is how you do it:

FunnelConnectSDK.shared.initialize(sdkToken: "test123")

Initializing with custom options

FCOptions() is an optional initialization parameter, so you can initialize the SDK without passing it, but in case there are options that you want to specifically enable or disable, this can be done by passing a custom options object to the initializer. Currently, enable debugging is the only available option, but there will be more in the future.

let options = FCOptions(enableLogging: true)  
FunnelConnectSDK.shared.initialize(sdkToken: "test123", options:  options)

Check if the SDK is initialized

At some point, you will want to check if the SDK is initialized before doing anything else.

Boolean check
FunnelConnectSDK.shared.didInitializeWithResult { [weak self] in
        // Success Action
} failure: { [weak self] error in
        // Failure Actio

you would need to do this if you want to do something with the SDK very early (for example in the splash screen) and you want to make sure that the SDK is initialized before doing anything with the SDK, however if you will use the SDK services in a class that will require going through multiple steps, such as the cart page in an e-commerce app, most probably you won’t need to use these function because the SDK will be already initialized by the time of reaching to that page or class, so it is your call to decide when to use that check and when not to.

Clear cache

Cached data and cookies can be cleared easily using the following functions.

try? FunnelConnectSDK.shared.clearData()
try? FunnelConnectSDK.shared.clearCookies()

Basic usage

Once the SDK is initialized, all the services functions can be called by calling FunnelConnectSDK. to access the SDK functions.

Support and bug reporting

If you have any suggestions or you want to report a bug or ask a question, please create a new issue in this repository.

You can also check if there is a similar issue to yours that has been solved before.