Prechádzať zdrojové kódy

1.修改iOS Apex Drivers关于Order的通知处理。

Pen Li 7 rokov pred
rodič
commit
fbdfc26de7

+ 6 - 7
Redant Drivers/Apex And Drivers/AppDelegate.m

@@ -147,7 +147,7 @@
     }];
     [application registerForRemoteNotifications];
     
-    // 程序被强杀之后收到通知,点击启动应用
+    // 程序被强杀之后收到通知,点击 通知 启动应用
     if (launchOptions && application.applicationState == UIApplicationStateInactive) {
         
         NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
@@ -155,7 +155,7 @@
     }
 
     
-    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"isActive: %ld %s",application.applicationState,__func__]];
+//    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"isActive: %ld %s launchOptions:%@",application.applicationState,__func__,launchOptions]];
 
     return YES;
 }
@@ -225,15 +225,14 @@
 //            [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationHandleOrder object:nil userInfo:userInfo];
 //        }
 //    }
+//    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"isActive: %ld %s",[UIApplication sharedApplication].applicationState,__func__]];
+    
     completionHandler();
 }
-/**
- 程序处于非运行状态时,收到通知,点击Icon运行程序会调用此方法
- 程序处于运行状态或后台,收到通知也会调用此方法。
- */
+
 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
 
-    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"isActive: %ld %s",application.applicationState,__func__]];
+//    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"isActive: %ld %s",application.applicationState,__func__]];
     /**
      静默推送alert为空
      {

+ 1 - 1
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m

@@ -150,7 +150,7 @@
 }
 
 - (void)registNotification {
-    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
+//    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNewOrderNotification:) name:RANotificationHandleOrder object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveReloadNotification:) name:RANotificationReloadHome object:nil];
 }

+ 2 - 2
Redant Drivers/Apex And Drivers/RANavigationController.m

@@ -32,7 +32,7 @@
 }
 
 - (void)registNotification {
-    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
+//    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveHandleOrderNotification:) name:RANotificationHandleOrder object:nil];
 }
 
@@ -47,7 +47,7 @@
         orderType2 = @"";
     }
 
-    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
+//    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
     if (orderID) {
         [self pushDetailViewControllerForOrderID:orderID type:orderType type2:orderType2];
     }

+ 1 - 1
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.m

@@ -108,7 +108,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    [RASingleton.sharedInstance saveLogs];
+
     [self configureTable];
     [self configureNavigationBar];
     [self loadData];