diff options
Diffstat (limited to 'platform/iphone/app_delegate.mm')
| -rw-r--r-- | platform/iphone/app_delegate.mm | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm index a3af8ff163..dab75e08c8 100644 --- a/platform/iphone/app_delegate.mm +++ b/platform/iphone/app_delegate.mm @@ -100,7 +100,7 @@ static int frame_count = 0; int backingHeight; glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); - + OS::VideoMode vm; vm.fullscreen = true; @@ -118,7 +118,7 @@ static int frame_count = 0; NSString *documentsDirectory = [paths objectAtIndex:0]; //NSString *documentsDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; OSIPhone::get_singleton()->set_data_dir(String::utf8([documentsDirectory UTF8String])); - + NSString *locale_code = [[[NSLocale preferredLanguages] objectAtIndex:0] substringToIndex:2]; OSIPhone::get_singleton()->set_locale(String::utf8([locale_code UTF8String])); @@ -218,7 +218,7 @@ static int frame_count = 0; [application setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone]; // disable idle timer //application.idleTimerDisabled = YES; - + //Create a full-screen window window = [[UIWindow alloc] initWithFrame:rect]; //window.autoresizesSubviews = YES; @@ -236,9 +236,9 @@ static int frame_count = 0; int backingHeight; glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); - + iphone_main(backingWidth, backingHeight, gargc, gargv); - + view_controller = [[ViewController alloc] init]; view_controller.view = glView; window.rootViewController = view_controller; @@ -248,7 +248,7 @@ static int frame_count = 0; printf("cadisaplylink: %d", glView.useCADisplayLink); glView.animationInterval = 1.0 / kRenderingFrequency; [glView startAnimation]; - + //Show the window [window makeKeyAndVisible]; @@ -261,9 +261,9 @@ static int frame_count = 0; //OSIPhone::screen_width = rect.size.width - rect.origin.x; //OSIPhone::screen_height = rect.size.height - rect.origin.y; - + mainViewController = view_controller; - + #ifdef MODULE_GAME_ANALYTICS_ENABLED printf("********************* didFinishLaunchingWithOptions\n"); if(!Globals::get_singleton()->has("mobileapptracker/advertiser_id")) @@ -274,24 +274,24 @@ static int frame_count = 0; { return; } - + String adid = GLOBAL_DEF("mobileapptracker/advertiser_id",""); String convkey = GLOBAL_DEF("mobileapptracker/conversion_key",""); - + NSString * advertiser_id = [NSString stringWithUTF8String:adid.utf8().get_data()]; NSString * conversion_key = [NSString stringWithUTF8String:convkey.utf8().get_data()]; - + // Account Configuration info - must be set [MobileAppTracker initializeWithMATAdvertiserId:advertiser_id MATConversionKey:conversion_key]; - + // Used to pass us the IFA, enables highly accurate 1-to-1 attribution. // Required for many advertising networks. [MobileAppTracker setAppleAdvertisingIdentifier:[[ASIdentifierManager sharedManager] advertisingIdentifier] advertisingTrackingEnabled:[[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]]; - + #endif - + }; - (void)applicationWillTerminate:(UIApplication*)application { @@ -389,7 +389,7 @@ static int frame_count = 0; [PFPush handlePush:userInfo]; NSDictionary *aps = [userInfo objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - + NSLog(@"Push Notification Payload (app active) %@", aps); [defaults setObject:aps forKey:@"notificationInfo"]; [defaults synchronize]; |