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>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.6</string>
<string>1.0.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.6.2</string>
<string>1.0.7</string>
<key>LOGS_EMAIL</key>
<string>support@whispersystems.org</string>
<key>LOGS_URL</key>

@ -164,7 +164,13 @@
}
-(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 {
@ -213,11 +219,19 @@
}
-(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{
return UIUserNotificationTypeAlert | UIUserNotificationTypeSound;
if (SYSTEM_VERSION_LESS_THAN(_iOS_8_0)) {
return UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
} else {
return UIUserNotificationTypeAlert | UIUserNotificationTypeSound;
}
}
@end

Loading…
Cancel
Save