Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Latest commit

 

History

History
72 lines (45 loc) · 2.73 KB

File metadata and controls

72 lines (45 loc) · 2.73 KB

Deprecation Notice

This fork was originally created to support Swift Package Manager. Rather than update to include privacy manifest support as part of mParticle's 8.5.0 release, the fork has been retired as that release supports SPM directly.


Iterable Kit Integration

This repository contains the Iterable integration for the mParticle Apple SDK.

Adding the integration

  1. Add the kit dependency to your app's Podfile or Cartfile:

    pod 'mParticle-Iterable', '~> 8'
    

    OR

    github "mparticle-integrations/mparticle-apple-integration-iterable" ~> 8.0
    

    Carthage Note: Due to Carthage limitations with the Iterable SDK project, make sure to use the --use-xcframeworks --no-use-binaries flags when running carthage update.

  2. Follow the mParticle iOS SDK quick-start, then rebuild and launch your app, and verify that you see "Included kits: { Iterable }" in your Xcode console

(This requires your mParticle log level to be at least Debug)

  1. Reference mParticle's integration docs below to enable the integration.

Deep-linking

Set the property onAttributionComplete: on MParticleOptions when initializing the mParticle SDK. A copy of your block will be invoked to provide the respective information:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    MParticleOptions *options = [MParticleOptions optionsWithKey:@"<<Your app key>>" secret:@"<<Your app secret>>"];
    options.onAttributionComplete = ^void (MPAttributionResult *_Nullable attributionResult, NSError * _Nullable error) {
        if (error) {
            NSLog(@"Attribution fetching for kitCode=%@ failed with error=%@", error.userInfo[mParticleKitInstanceKey], error);
            return;
        }

        NSLog(@"Attribution fetching for kitCode=%@ completed with linkInfo: %@", attributionResult.kitCode, attributionResult.linkInfo);

    }
    [[MParticle sharedInstance] startWithOptions:options];

    return YES;
}

A copy of your block will be passed an attributionResult containing a linkInfo dictionary with the following data. Use the IterableDestinationURLKey to navigate to your desired location within the app.

{
	"IterableDestinationURLKey" : "<the destination url>",
	"IterableClickedURLKey" : "<the clicked url>"
}

Documentation

Iterable integration

License

Apache License 2.0