基础组件库
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.

AppDelegate.m 1.9 KiB

4 anni fa
4 anni fa
4 anni fa
4 anni fa
4 anni fa
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. @"master_id": @"template_database",
  26. @"secret_key": @"123456"
  27. //@"domain": @"http://192.168.0.113:5000"
  28. };
  29. }
  30. #pragma mark -- 第三方应用跳转
  31. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
  32. // 如果百川处理过会返回YES
  33. if (![[AlibcTradeSDK sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) {
  34. return YES;
  35. }
  36. return NO;
  37. }
  38. //IOS9.0 系统新的处理openURL 的API
  39. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
  40. if (@available(iOS 9.0, *)) {
  41. __unused BOOL isHandledByALBBSDK=[[AlibcTradeSDK sharedInstance] application:application openURL:url options:options];
  42. return isHandledByALBBSDK;
  43. } else {
  44. // Fallback on earlier versions
  45. }//处理其他app跳转到自己的app,如果百川处理过会返回YES
  46. return NO;
  47. }
  48. @end