Last active
March 18, 2019 21:00
-
-
Save flurrydev/113d7520b19260878109ce17ab941cb1 to your computer and use it in GitHub Desktop.
Manually start Flurry session in UnityAppController.mm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "FlurryUnityPlugin.h" | |
| ..... | |
| //in UnityAppController.mm | |
| - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions | |
| { | |
| ::printf("-> applicationDidFinishLaunching()\n"); | |
| FlurryUnityPlugin* sharedInstance = [FlurryUnityPlugin shared]; | |
| [sharedInstance setupFlurryAutoMessaging]; | |
| [Flurry setDelegate:(id <FlurryDelegate>) sharedInstance]; | |
| //Ensure that each parameter corresponds to those set in the builder in your CSharp script | |
| FlurrySessionBuilder* builder = [[[[[FlurrySessionBuilder new] | |
| withLogLevel:FlurryLogLevelAll] | |
| withCrashReporting:YES] | |
| withSessionContinueSeconds:10] | |
| withAppVersion:@"YOUR_APP_VERSION"]; | |
| [Flurry startSession:@"FLURRY_API_KEY" withSessionBuilder:builder]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment