ad localnoti background music

This commit is contained in:
lianxiang
2018-08-24 21:20:18 +08:00
parent d43d7eaaf6
commit 983bb33644
25 changed files with 1773 additions and 35 deletions
+12 -1
View File
@@ -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];