Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.34 KB

Integrate-iOS.md

File metadata and controls

45 lines (32 loc) · 1.34 KB

👩‍💻 iOS Integration

After installation, you will need to integrate CleverTap SDK into your app.

  • Follow the integration instructions starting with Step 2 here.

  • Initialize CleverTap SDK by adding the following code snippet:

    • Import the CleverTap header in your AppDelegate file
    Objective-C
    #import "CleverTap.h"
    #import "CleverTapPlugin.h"
    Swift
    import CleverTapSDK
    import clevertap_plugin
    • In your didFinishLaunchingWithOptions: method notify the CleverTap Flutter SDK of application launch
    Objective-C
    [CleverTap autoIntegrate]; // integrate CleverTap SDK using the autoIntegrate option
    [[CleverTapPlugin sharedInstance] applicationDidLaunchWithOptions:launchOptions];
    Swift
    CleverTap.autoIntegrate() // integrate CleverTap SDK using the autoIntegrate option
    CleverTapPlugin.sharedInstance()?.applicationDidLaunch(options: launchOptions)

Set up and register for push notifications

  1. Set up push notifications for your app.

  2. Call the following from your Dart.

CleverTapPlugin.registerForPush();