iOS

Requirements

iOS minimal deployment 11

Include the SDK

Nefta SDK can be included through Cocoapods or manually:

  • CocoaPods
    in your podfile add:

      pod 'NeftaSDK', '4.4.1'
  • Manually
    You can download the latest NeftaPlugin module from: https://github.com/Nefta-io/NeftaSDK-iOS/releases.

    Unzip it and copy it inside your project, so that it will look something like this:

    Then include this framework in your project go to project settings in the General tab for your Target and scroll down to Framework, Libraries and Embedded Content section and click on the + button:

    In the popup window select Add Other... > From files... and select xcframework that you have copied over in the previous step:

    After this the framework section should look like this:

Configuration

For this part, you will need the appId which you can get here.

Code integration

You initialize the SDK with the following code:

_plugin = NeftaPlugin.Init(appId: "[[your_app_id]]")
#import <NeftaSDK/NeftaSDK-Swift.h>

_plugin = [NeftaPlugin InitWithAppId: @"[[your_app_id]]"];

Do this as soon as possible in the application startup! If you leave the appId parameter nil or empty the SDK will run in demo mode. To test the native integration without dashboard configuration.