基础组件库
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

64 righe
1.8 KiB

  1. #import "AppDelegate.h"
  2. #import "GeneratedPluginRegistrant.h"
  3. #import <zhiying_comm/ZhiyingCommNative.h>
  4. #import <AlibcTradeSDK/AlibcTradeSDK.h>
  5. @implementation AppDelegate
  6. - (BOOL)application:(UIApplication *)application
  7. didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  8. [GeneratedPluginRegistrant registerWithRegistry:self];
  9. // Override point for customization after application launch.
  10. [ZhiyingCommNative regist: self];
  11. return [super application:application didFinishLaunchingWithOptions:launchOptions];
  12. }
  13. // 公共跳转方法
  14. - (void)openPage: (NSDictionary*)params {
  15. }
  16. - (void)openNativePage: (NSDictionary*)params {
  17. NSString *method = [params valueForKey:@"method"];
  18. if ([method isEqualToString: @""]) {
  19. }
  20. }
  21. // 获取设置
  22. - (NSDictionary*)getSetting {
  23. return @{
  24. @"domain": @"http://inapi.izhyin.cn"
  25. //@"domain": @"http://192.168.0.113:5000"
  26. };
  27. }
  28. #pragma mark -- 第三方应用跳转
  29. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
  30. // 如果百川处理过会返回YES
  31. if (![[AlibcTradeSDK sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) {
  32. return YES;
  33. }
  34. return NO;
  35. }
  36. //IOS9.0 系统新的处理openURL 的API
  37. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
  38. if (@available(iOS 9.0, *)) {
  39. __unused BOOL isHandledByALBBSDK=[[AlibcTradeSDK sharedInstance] application:application openURL:url options:options];
  40. return isHandledByALBBSDK;
  41. } else {
  42. // Fallback on earlier versions
  43. }//处理其他app跳转到自己的app,如果百川处理过会返回YES
  44. return NO;
  45. }
  46. @end