AppDelegate.m 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. // AppDelegate.m
  3. // NatureDemo
  4. //
  5. // Created by SAGESSE on 2019/1/20.
  6. // Copyright © 2019 SAGESSE. All rights reserved.
  7. //
  8. #import "AppDelegate.h"
  9. #import "XenonSDK.h"
  10. @interface AppDelegate ()
  11. @end
  12. @implementation AppDelegate
  13. //#define T_FOREACH_ARGC_(_0,_1,_2,_3,_4,_5,_6,_7,N,...) N
  14. //#define T_FOREACH_ARGC(...) T_FOREACH_ARGC_(0, ##__VA_ARGS__, 7,6,5,4,3,2,1,0)
  15. //
  16. //#define T_FOREACH_1(F,N,_1) F(_1)
  17. //#define T_FOREACH_2(F,N,_1,_2) T_FOREACH_1(F,N,_1) N F(_2)
  18. //#define T_FOREACH_3(F,N,_1,_2,_3) T_FOREACH_2(F,N,_1,_2) N F(_3)
  19. //#define T_FOREACH_4(F,N,_1,_2,_3,_4) T_FOREACH_3(F,N,_1,_2,_3) N F(_4)
  20. //#define T_FOREACH_5(F,N,_1,_2,_3,_4,_5) T_FOREACH_4(F,N,_1,_2,_3,_4) N F(_5)
  21. //#define T_FOREACH_6(F,N,_1,_2,_3,_4,_5,_6) T_FOREACH_5(F,N,_1,_2,_3,_4,_5) N F(_6)
  22. //#define T_FOREACH_7(F,N,_1,_2,_3,_4,_5,_6,_7) T_FOREACH_6(F,N,_1,_2,_3,_4,_5,_6) N F(_7)
  23. //
  24. //#define T_FOREACH_CONCAT_(A, B) A ## B
  25. //#define T_FOREACH_CONCAT(A, B) T_FOREACH_CONCAT_(A, B)
  26. //
  27. //#define T_FOREACH(F, N, ...) T_FOREACH_CONCAT(T_FOREACH_, T_FOREACH_ARGC(__VA_ARGS__))(F, N, __VA_ARGS__)
  28. //
  29. //#define T_FORMATS_U(P) @#P"=%@"
  30. //#define T_FORMATS(...) T_FOREACH(T_FORMATS_U, ", ", ##__VA_ARGS__)
  31. //
  32. //#define T(...) NSLog(@"%s " T_FORMATS(__VA_ARGS__), __func__, __VA_ARGS__)
  33. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  34. // [XenonSDK.sharedSDK initWithParameter:@"20309|1105|534383&xsdmxios_IOS_0001" complete:^(NSError * error) {
  35. // //检查是否有漏单
  36. // [XenonSDK.sharedSDK checkOrderStatus];
  37. // //登录
  38. // [XenonSDK.sharedSDK loginWithComplete:^(id user, NSError * error) {
  39. // NSLog(@"SDK初始化成功");
  40. // }];
  41. // }];
  42. //
  43. return YES;
  44. }
  45. - (void)applicationWillResignActive:(UIApplication *)application {
  46. // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
  47. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
  48. }
  49. - (void)applicationDidEnterBackground:(UIApplication *)application {
  50. // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
  51. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  52. }
  53. - (void)applicationWillEnterForeground:(UIApplication *)application {
  54. // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
  55. }
  56. - (void)applicationDidBecomeActive:(UIApplication *)application {
  57. // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
  58. }
  59. - (void)applicationWillTerminate:(UIApplication *)application {
  60. // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  61. }
  62. //
  63. //- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
  64. // if (window.rootViewController.presentedViewController.parentViewController != nil) {
  65. // return UIInterfaceOrientationMaskAll;
  66. // }
  67. // return UIInterfaceOrientationMaskLandscape;
  68. //}
  69. @end