#import "AppDelegate.h" #import "GeneratedPluginRegistrant.h" #import #import @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GeneratedPluginRegistrant registerWithRegistry:self]; // Override point for customization after application launch. [ZhiyingCommNative regist: self]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } // 公共跳转方法 - (void)openPage: (NSDictionary*)params { } - (void)openNativePage: (NSDictionary*)params { NSString *method = [params valueForKey:@"method"]; if ([method isEqualToString: @""]) { } } // 获取设置 - (NSDictionary*)getSetting { // return @{ // @"domain": @"http://inapi.izhyin.cn", // @"master_id": @"123456", // @"secret_key": @"123456" //@"domain": @"http://192.168.0.113:5000" // }; return @{ @"domain": @"http://api.zhios.cn", @"master_id": @"99813608", @"secret_key": @"123456" //@"domain": @"http://192.168.0.113:5000" }; } #pragma mark -- 第三方应用跳转 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{ // 如果百川处理过会返回YES if (![[AlibcTradeSDK sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) { return YES; } return [super application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; } //IOS9.0 系统新的处理openURL 的API - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options { if (@available(iOS 9.0, *)) { __unused BOOL isHandledByALBBSDK=[[AlibcTradeSDK sharedInstance] application:application openURL:url options:options]; if (isHandledByALBBSDK) return isHandledByALBBSDK; } else { // Fallback on earlier versions }//处理其他app跳转到自己的app,如果百川处理过会返回YES return [super application:application openURL:url options:options]; } @end