Skip to content

motivateco/mparticle-apple-integration-branchmetrics

 
 

Repository files navigation

mParticle Apple Kit Library

A kit is an extension to the core mParticle Apple SDK. A kit works as a bridge between the mParticle SDK and a partner SDK. It abstracts the implementation complexity, simplifying the implementation for developers.

A kit takes care of initializing and forwarding information depending on what you've configured in your app's dashboard, so you just have to decide which kits you may use prior to submission to the App Store. You can easily include all of the kits, none of the kits, or individual kits – the choice is yours.

CocoaPods compatible Carthage compatible

Installation

Please refer to the examples in this repository, the installation instructions in the core mParticle Apple SDK README, or check out our SDK Documentation site to learn more.

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

Support

Questions? Give us a shout at [email protected]

License

This mParticle Apple Kit is available under the Apache License, Version 2.0. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 96.1%
  • Ruby 3.9%