基础组件库
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

69 wiersze
2.1 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. @"master_id": @"123456",
  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 [super application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
  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. if (isHandledByALBBSDK)
  43. return isHandledByALBBSDK;
  44. } else {
  45. // Fallback on earlier versions
  46. }//处理其他app跳转到自己的app,如果百川处理过会返回YES
  47. return [super application:application openURL:url options:options];
  48. }
  49. @end