Fixing iOS 7 push notification issue

#176 will complement this
//FREEBIE
pull/1/head
Frederic Jacobs 11 years ago
parent 7b388da350
commit c572132c95

@ -21,11 +21,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.6</string> <string>1.0.7</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0.6.2</string> <string>1.0.7</string>
<key>LOGS_EMAIL</key> <key>LOGS_EMAIL</key>
<string>support@whispersystems.org</string> <string>support@whispersystems.org</string>
<key>LOGS_URL</key> <key>LOGS_URL</key>

@ -164,7 +164,13 @@
} }
-(BOOL) needToRegisterForRemoteNotifications { -(BOOL) needToRegisterForRemoteNotifications {
return self.wantRemoteNotifications && !UIApplication.sharedApplication.isRegisteredForRemoteNotifications; if (SYSTEM_VERSION_LESS_THAN(_iOS_8_0)) {
return self.wantRemoteNotifications;
} else{
return self.wantRemoteNotifications && (!UIApplication.sharedApplication.isRegisteredForRemoteNotifications);
}
} }
-(BOOL) wantRemoteNotifications { -(BOOL) wantRemoteNotifications {
@ -213,11 +219,19 @@
} }
-(int)allNotificationTypes{ -(int)allNotificationTypes{
return UIUserNotificationTypeAlert | UIUserNotificationTypeSound | UIUserNotificationTypeBadge; if (SYSTEM_VERSION_LESS_THAN(_iOS_8_0)) {
return UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeBadge;
} else {
return UIUserNotificationTypeAlert | UIUserNotificationTypeSound | UIUserNotificationTypeBadge;
}
} }
-(int)mandatoryNotificationTypes{ -(int)mandatoryNotificationTypes{
return UIUserNotificationTypeAlert | UIUserNotificationTypeSound; if (SYSTEM_VERSION_LESS_THAN(_iOS_8_0)) {
return UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
} else {
return UIUserNotificationTypeAlert | UIUserNotificationTypeSound;
}
} }
@end @end

Loading…
Cancel
Save