|
|
@@ -12,8 +12,6 @@
|
|
|
#import <CoreLocation/CoreLocation.h>
|
|
|
#import "RANavigationController.h"
|
|
|
|
|
|
-static const NSInteger OrderTypeNew = 2;
|
|
|
-
|
|
|
@interface AppDelegate ()<UNUserNotificationCenterDelegate,CLLocationManagerDelegate>
|
|
|
|
|
|
@property (nonatomic,strong) CLLocationManager *locationManager;
|
|
|
@@ -113,9 +111,11 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
// orderID = [aps objectForKey:@"order-id"];
|
|
|
// orderType = [[aps objectForKey:@"order-type"] integerValue];
|
|
|
// orderType2 = [aps objectForKey:@"order-type2"];
|
|
|
-//
|
|
|
+//
|
|
|
// }
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// View
|
|
|
|
|
|
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
|
|
|
@@ -147,7 +147,16 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
}];
|
|
|
[application registerForRemoteNotifications];
|
|
|
|
|
|
+ // 程序被强杀之后收到通知,点击启动应用
|
|
|
+ if (launchOptions && application.applicationState == UIApplicationStateInactive) {
|
|
|
+
|
|
|
+ NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationHandleOrder object:nil userInfo:userInfo];
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
+ [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"isActive: %ld %s",application.applicationState,__func__]];
|
|
|
+
|
|
|
return YES;
|
|
|
}
|
|
|
|
|
|
@@ -216,8 +225,6 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
// [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationHandleOrder object:nil userInfo:userInfo];
|
|
|
// }
|
|
|
// }
|
|
|
-
|
|
|
-
|
|
|
completionHandler();
|
|
|
}
|
|
|
/**
|
|
|
@@ -226,6 +233,7 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
*/
|
|
|
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
|
|
|
|
|
|
+ [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"isActive: %ld %s",application.applicationState,__func__]];
|
|
|
/**
|
|
|
静默推送alert为空
|
|
|
{
|