Revision f14ddbf9 Classes/OpenStackAppDelegate.m

b/Classes/OpenStackAppDelegate.m
152 152
    return YES;
153 153
}
154 154

  
155
- (void) setupDependencies {
156
#if TARGET_OS_EMBEDDED
157
    
158
    NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Constants" ofType:@"plist"];
159
    
160
    if ([[NSFileManager defaultManager] fileExistsAtPath:path]){
161
        
162
        NSDictionary *constants = [NSDictionary dictionaryWithContentsOfFile:path];
163
        
164
        [HTNotifier startNotifierWithAPIKey:[constants objectForKey:@"HOPTOAD_ACCOUNT_KEY"]
165
                            environmentName:HTNotifierAppStoreEnvironment];
166
        [[GANTracker sharedTracker] startTrackerWithAccountID:[constants objectForKey:@"ANALYTICS_ACCOUNT_KEY"] dispatchPeriod:10 delegate:nil];
167
        
168
        // track the app version
169
        NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
170
        [[GANTracker sharedTracker] setCustomVariableAtIndex:1 name:@"app_version" value:version withError:nil];
171
        
172
        DispatchAnalytics();
173

  
174
    } else {
175
        [HTNotifier startNotifierWithAPIKey:@"HOPTOAD_ACCOUNT_KEY" environmentName:HTNotifierAppStoreEnvironment];
176
        [[GANTracker sharedTracker] startTrackerWithAccountID:@"ANALYTICS_ACCOUNT_KEY" dispatchPeriod:10 delegate:nil];
177
    }
178
    
179
#endif
180
}
155
//- (void) setupDependencies {
156
//#if TARGET_OS_EMBEDDED
157
//    
158
//    NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Constants" ofType:@"plist"];
159
//    
160
//    if ([[NSFileManager defaultManager] fileExistsAtPath:path]){
161
//        
162
//        NSDictionary *constants = [NSDictionary dictionaryWithContentsOfFile:path];
163
//        
164
//        [HTNotifier startNotifierWithAPIKey:[constants objectForKey:@"HOPTOAD_ACCOUNT_KEY"]
165
//                            environmentName:HTNotifierAppStoreEnvironment];
166
//        [[GANTracker sharedTracker] startTrackerWithAccountID:[constants objectForKey:@"ANALYTICS_ACCOUNT_KEY"] dispatchPeriod:10 delegate:nil];
167
//        
168
//        // track the app version
169
//        NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
170
//        [[GANTracker sharedTracker] setCustomVariableAtIndex:1 name:@"app_version" value:version withError:nil];
171
//        
172
//        DispatchAnalytics();
173
//
174
//    } else {
175
//        [HTNotifier startNotifierWithAPIKey:@"HOPTOAD_ACCOUNT_KEY" environmentName:HTNotifierAppStoreEnvironment];
176
//        [[GANTracker sharedTracker] startTrackerWithAccountID:@"ANALYTICS_ACCOUNT_KEY" dispatchPeriod:10 delegate:nil];
177
//    }
178
//    
179
//#endif
180
//}
181 181

  
182 182

  
183 183
- (void)applicationWillResignActive:(UIApplication *)application {

Also available in: Unified diff