123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // AppDelegate.m
- // Artimenring
- //
- // Created by BaH Cy on 14/12/16.
- // Copyright (c) 2014年 BaH Cy. All rights reserved.
- //
- #import "AppDelegate.h"
- #import "AppDelegate+sdk.h"
- #import "AppDelegate+login.h"
- #import "AppDelegate+notification.h"
- #import <FBSDKCoreKit/FBSDKCoreKit.h>
- #import <GoogleSignIn/GoogleSignIn.h>
- @implementation AppDelegate
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- //NSSetUncaughtExceptionHandler(uncaughtExceptionHandler);
-
- [[UIApplication sharedApplication] delegate].window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- [[UIApplication sharedApplication] delegate].window.backgroundColor = [UIColor whiteColor];
- [[[UIApplication sharedApplication] delegate].window makeKeyAndVisible];
-
- [self initNotification:application];
- [AppDelegate initSdk:application didFinishLaunchingWithOptions:launchOptions];
- [AppDelegate monitorNetworking];
- [AppDelegate initIQKeyboard];
- [AppDelegate showAdvertising];
- [AppDelegate create3DTouch];
- [AppDelegate checkLogin];
- [WindowLoggerManager init];
-
- return YES;
- }
- - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
- BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
- if (handled) {
- return YES;
- }
-
- #ifdef SK_DEBUG_GOOGLE_FACEBOOK
- handled = [GIDSignIn.sharedInstance handleURL:url];
- if (handled) {
- return YES;
- }
- #endif
-
- return YES;
- }
- - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options {
- #ifdef SK_DEBUG_GOOGLE_FACEBOOK
- return [[GIDSignIn sharedInstance] handleURL:url];
- #endif
- return YES;
- }
- - (void)applicationDidBecomeActive:(UIApplication *)application {
- //[FBSDKAppEvents activateApp];
- }
- @end
|