ad localnoti background music
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
|
||||
//极光推送
|
||||
//APNS Regist
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
|
||||
[JPUSHService resetBadge];
|
||||
|
||||
JPUSHRegisterEntity * entity = [[JPUSHRegisterEntity alloc] init];
|
||||
entity.types = JPAuthorizationOptionAlert|JPAuthorizationOptionBadge|JPAuthorizationOptionSound;
|
||||
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
|
||||
@@ -32,6 +35,7 @@
|
||||
apsForProduction:GIGA_PUSH_ENVIRONMENT
|
||||
advertisingIdentifier:nil];
|
||||
|
||||
|
||||
//微信
|
||||
|
||||
|
||||
@@ -61,6 +65,9 @@
|
||||
// ios 10 Support
|
||||
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10.0)){
|
||||
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
|
||||
[JPUSHService resetBadge];
|
||||
|
||||
// Required
|
||||
NSDictionary * userInfo = response.notification.request.content.userInfo;
|
||||
GILog(@"ios(10.0)-userInfo%@",userInfo);
|
||||
@@ -79,7 +86,6 @@
|
||||
[JPUSHService handleRemoteNotification:userInfo];
|
||||
}
|
||||
completionHandler(UNNotificationPresentationOptionAlert|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionBadge); // 需要执行这个方法,选择是否提醒用户,有Badge、Sound、Alert三种类型可以选择设置
|
||||
|
||||
}
|
||||
|
||||
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
|
||||
@@ -94,6 +100,9 @@
|
||||
|
||||
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
|
||||
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
|
||||
[JPUSHService resetBadge];
|
||||
|
||||
// Required, iOS 7 Support
|
||||
GILog(@"iOS 7 userInfo%@",userInfo);
|
||||
[JPUSHService handleRemoteNotification:userInfo];
|
||||
@@ -102,6 +111,8 @@
|
||||
|
||||
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
|
||||
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
|
||||
[JPUSHService resetBadge];
|
||||
// Required,For systems with less than or equal to iOS6
|
||||
[JPUSHService handleRemoteNotification:userInfo];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user