|
@@ -40,10 +40,11 @@ RQAppEventMod(APPdelegateModularForPush)
|
|
|
}
|
|
|
|
|
|
- (void)initMudule {
|
|
|
- // 通过个推平台分配的appId、 appKey 、appSecret 启动SDK,注:该方法需要在主线程中调用
|
|
|
- dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
- [GeTuiSdk startSdkWithAppId:kGtAppId appKey:kGtAppKey appSecret:kGtAppSecret delegate:self launchingOptions:nil];
|
|
|
- });
|
|
|
+ //暂时-屏蔽个推
|
|
|
+// // 通过个推平台分配的appId、 appKey 、appSecret 启动SDK,注:该方法需要在主线程中调用
|
|
|
+// dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+// [GeTuiSdk startSdkWithAppId:kGtAppId appKey:kGtAppKey appSecret:kGtAppSecret delegate:self launchingOptions:nil];
|
|
|
+// });
|
|
|
// 注册 通知(本地/远程)
|
|
|
[self registerRemoteNotification];
|
|
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_10_0
|
|
@@ -118,7 +119,7 @@ RQAppEventMod(APPdelegateModularForPush)
|
|
|
NSLog(@"\n>>>[DeviceToken Success]:%@\n\n", token);
|
|
|
|
|
|
// 向个推服务器注册deviceToken
|
|
|
- [GeTuiSdk registerDeviceToken:token];
|
|
|
+// [GeTuiSdk registerDeviceToken:token];
|
|
|
}
|
|
|
|
|
|
/** 远程通知注册失败委托 */
|
|
@@ -130,7 +131,7 @@ RQAppEventMod(APPdelegateModularForPush)
|
|
|
//iOS7.0 以后支持 APP 后台刷新数据,会回调 performFetchWithCompletionHandler 接口。为保证个推SDK的数据刷新,需在该回调接口中调用[GeTuiSdk resume]方法帮助个推 SDK 刷新数据。
|
|
|
- (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
|
|
|
/// Background Fetch 恢复SDK 运行
|
|
|
- [GeTuiSdk resume];
|
|
|
+ //[GeTuiSdk resume];
|
|
|
completionHandler(UIBackgroundFetchResultNewData);
|
|
|
}
|
|
|
|
|
@@ -141,12 +142,12 @@ RQAppEventMod(APPdelegateModularForPush)
|
|
|
NSLog(@"didReceiveRemoteNotification and iOS<10");
|
|
|
if ([application isKindOfClass:[NSDictionary class]]) {
|
|
|
// 将收到的APNs信息传给个推统计
|
|
|
- [GeTuiSdk handleRemoteNotification:(NSDictionary *)application];
|
|
|
+ //[GeTuiSdk handleRemoteNotification:(NSDictionary *)application];
|
|
|
completionHandler(UIBackgroundFetchResultNewData);
|
|
|
[self remoteNotificationDealWithDic:(NSDictionary *)application];
|
|
|
} else {
|
|
|
// 将收到的APNs信息传给个推统计
|
|
|
- [GeTuiSdk handleRemoteNotification:userInfo];
|
|
|
+ //[GeTuiSdk handleRemoteNotification:userInfo];
|
|
|
completionHandler(UIBackgroundFetchResultNewData);
|
|
|
[self remoteNotificationDealWithDic:userInfo];
|
|
|
}
|
|
@@ -174,7 +175,7 @@ RQAppEventMod(APPdelegateModularForPush)
|
|
|
NSLog(@"didReceiveNotification and iOS>10后台获取到通知:%@", response.notification.request.content.userInfo);
|
|
|
|
|
|
// [ GTSdk ]:将收到的APNs信息传给个推统计
|
|
|
- [GeTuiSdk handleRemoteNotification:response.notification.request.content.userInfo];
|
|
|
+ //[GeTuiSdk handleRemoteNotification:response.notification.request.content.userInfo];
|
|
|
|
|
|
completionHandler();
|
|
|
|
|
@@ -389,7 +390,7 @@ RQAppEventMod(APPdelegateModularForPush)
|
|
|
//程序复原
|
|
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
|
|
//删除程序小红点
|
|
|
- [GeTuiSdk resetBadge]; //重置角标计数
|
|
|
+ //[GeTuiSdk resetBadge]; //重置角标计数
|
|
|
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; // APP 清空角标
|
|
|
|
|
|
if (myDelegate.timer) {
|