AppDelegate.m 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // AppDelegate.m
  3. // Artimenring
  4. //
  5. // Created by BaH Cy on 14/12/16.
  6. // Copyright (c) 2014年 BaH Cy. All rights reserved.
  7. //
  8. #import "AppDelegate.h"
  9. #import "AppDelegate+sdk.h"
  10. #import "AppDelegate+login.h"
  11. #import "AppDelegate+notification.h"
  12. #import <FBSDKCoreKit/FBSDKCoreKit.h>
  13. #import <GoogleSignIn/GoogleSignIn.h>
  14. @implementation AppDelegate
  15. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  16. //NSSetUncaughtExceptionHandler(uncaughtExceptionHandler);
  17. [[UIApplication sharedApplication] delegate].window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  18. [[UIApplication sharedApplication] delegate].window.backgroundColor = [UIColor whiteColor];
  19. [[[UIApplication sharedApplication] delegate].window makeKeyAndVisible];
  20. [AppDelegate initNotification:application];
  21. [AppDelegate initSdk:application didFinishLaunchingWithOptions:launchOptions];
  22. [AppDelegate monitorNetworking];
  23. [AppDelegate initIQKeyboard];
  24. [AppDelegate showAdvertising];
  25. [AppDelegate create3DTouch];
  26. [AppDelegate checkLogin];
  27. return YES;
  28. }
  29. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
  30. [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
  31. [[GIDSignIn sharedInstance] handleURL:url];
  32. return YES;
  33. }
  34. - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options {
  35. return [[GIDSignIn sharedInstance] handleURL:url];
  36. }
  37. - (void)applicationDidBecomeActive:(UIApplication *)application {
  38. [FBSDKAppEvents activateApp];
  39. }
  40. @end