Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- // Override point for customization after application launch.
- // NSString *filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
- // FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
- // [FIRApp configureWithOptions:options];
- [FIRApp configure];
- [WKDataProvider sharedManager];
- [Fabric with:@[[Crashlytics class]]]; // For Crashlytics
- // Use Firebase library to configure APIs
- [self customizeNavigationBarAppearance];
- self.locationTracker = [LocationTracker sharedTracker];
- [self.locationTracker startLocationTracking];
- if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0")) {
- [[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
- [[UIView appearanceWhenContainedIn:[UIAlertController class], nil] setSemanticContentAttribute:UISemanticContentAttributeUnspecified];
- [[UIView appearanceWhenContainedIn:[UIAlertView class], nil] setSemanticContentAttribute:UISemanticContentAttributeUnspecified];
- }
- //LocalizationSetLanguage(English);
- //call this within 'loadSplashVideo' method, app launch from watch app may crash
- NSString *lang = [LocalizationGetLanguage isEqualToString:English]? English : Arabic ;
- LocalizationSetLanguage(lang);
- [self initSlideMenuForLanguage:lang];
- // END //
- //Workaround to fix backround launch from watchapp crash
- if (application.applicationState == UIApplicationStateBackground){
- self.isLaunchedFromWatckApp = YES ;
- }
- else{
- self.isLaunchedFromWatckApp = NO ;
- // [self animteSplashScreen];
- [self loadSplashVideo];
- }
- //Opens app with notification
- [OneSignal initWithLaunchOptions:launchOptions appId:[BuildSettingsUtil oneSignalKey] handleNotificationAction:^(OSNotificationOpenedResult *result) {
- [self showOrderDetailViewForNotification : result];
- NSLog(result);
- }];
- [self initializeGoogleServices];
- [self checkVersionCompatability];
- // start from Authorization page
- if ([KeychainAccessOperation loadDataWithKey:KeychainKeysUserId]!= nil) {
- UIStoryboard *storybaord = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
- AuthorizeRegisterViewController *vc = (AuthorizeRegisterViewController *) [storybaord instantiateViewControllerWithIdentifier:@"authorizedViewID"];
- JahezNavigationController *nav = [[JahezNavigationController alloc] initWithRootViewController:vc];
- self.window.rootViewController = nav;
- }
- [self.window makeKeyAndVisible];
- return YES;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement