Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

soffes/localytics-ios

Repository files navigation

Localytics

This is my fork of the Localytics iOS client. Mainly fixing warnings and such.

Integration

Here's the macro and functions provided:

#define ANALYTICS_ENABLED (!DEBUG && !TARGET_IPHONE_SIMULATOR)

void LLStartSession(NSString *key);
void LLTagEvent(NSString *name);
void LLTagEventWithAttributes(NSString *name, NSDictionary *attributes);
void LLTagScreen(NSString *name);

App delegate:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  LLStartSession(@"YOUR_KEY");

  // ...

  return YES;
}


#if ANALYTICS_ENABLED
- (void)applicationWillEnterForeground:(UIApplication *)application {
    [[LocalyticsSession sharedLocalyticsSession] resume];
    [[LocalyticsSession sharedLocalyticsSession] upload];
}


- (void)applicationDidEnterBackground:(UIApplication *)application {
    [[LocalyticsSession sharedLocalyticsSession] close];
    [[LocalyticsSession sharedLocalyticsSession] upload];
}


- (void)applicationWillTerminate:(UIApplication *)application {
    [[LocalyticsSession sharedLocalyticsSession] close];
}
#endif

About

My fork of Localytics' iOS Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published