Skip to content

Instantly share code, notes, and snippets.

@tgoldenberg
Last active February 9, 2016 03:42
Show Gist options
  • Select an option

  • Save tgoldenberg/d04fe7e6bb08bf48d0d6 to your computer and use it in GitHub Desktop.

Select an option

Save tgoldenberg/d04fe7e6bb08bf48d0d6 to your computer and use it in GitHub Desktop.
Main RN File with Integrations
#import "AppDelegate.h"
#import <Analytics/SEGAnalytics.h>
#import <Segment-GoogleAnalytics/SEGGoogleAnalyticsIntegrationFactory.h>
#import <Segment-Branch/BNCBranchIntegrationFactory.h>
#import <Segment-Localytics/SEGLocalyticsIntegrationFactory.h>
#import "RCTRootView.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
[config use:[SEGGoogleAnalyticsIntegrationFactory instance]];
[config use:[BNCBranchIntegrationFactory instance]];
[config use:[SEGLocalyticsIntegrationFactory instance]];
[SEGAnalytics setupWithConfiguration:config];
NSURL *jsCodeLocation;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment