diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-07-02 00:09:36 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-07-02 00:09:36 -0300 |
commit | e9da61411a6f1c993d528b659ebb3e5147aa44cc (patch) | |
tree | 9aec099f021920e3c61835f1152616e2a8194351 /platform/iphone | |
parent | 77a15e2a3e1231bf9ba011af9ee10afe5fae17dd (diff) |
Fixed Bugs & Joypad in Android
================================
-resolved many graphical glitches with multiple lights in GLES2 render
-fixes and WIP apk expansion
-joystick support for Android by Ariel
Diffstat (limited to 'platform/iphone')
-rw-r--r-- | platform/iphone/app_delegate.mm | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm index c5ac5d9263..9ba95ff0c5 100644 --- a/platform/iphone/app_delegate.mm +++ b/platform/iphone/app_delegate.mm @@ -37,6 +37,12 @@ #include "modules/FacebookScorer_ios/FacebookScorer.h" #endif +#ifdef MODULE_GAME_ANALYTICS_ENABLED +#import "modules/game_analytics/ios/MobileAppTracker.framework/Headers/MobileAppTracker.h" +//#import "modules/game_analytics/ios/MobileAppTracker.h" +#import <AdSupport/AdSupport.h> +#endif + #define kFilteringFactor 0.1 #define kRenderingFrequency 60 #define kAccelerometerFrequency 100.0 // Hz @@ -210,7 +216,36 @@ 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; + mainViewController = view_controller; + +#ifdef MODULE_GAME_ANALYTICS_ENABLED + printf("********************* didFinishLaunchingWithOptions\n"); + if(!Globals::get_singleton()->has("mobileapptracker/advertiser_id")) + { + return; + } + if(!Globals::get_singleton()->has("mobileapptracker/conversion_key")) + { + 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 { @@ -240,6 +275,10 @@ static int frame_count = 0; - (void) applicationDidBecomeActive:(UIApplication *)application { printf("********************* did become active\n"); +#ifdef MODULE_GAME_ANALYTICS_ENABLED + printf("********************* mobile app tracker found\n"); + [MobileAppTracker measureSession]; +#endif [view_controller.view startAnimation]; // FIXME: resume seems to be recommended elsewhere } |