I am trying to compile an existing application using Xcode 6.
This is my code:
UIUserNotificationSettings *settings = [UIApplication.sharedApplication currentUserNotificationSettings];
That's my fault:
use of undeclared identifier 'UIUserNotificationSettings'
I do not know how to solve this problem.
Here is my check for iOS 8:
if (SYSTEM_VERSION_LESS_THAN(_iOS_8_0)) {
if ([self isMissingMandatoryNotificationTypes:[UIApplication.sharedApplication enabledRemoteNotificationTypes]]) {
[self registrationWithSuccess:^{
DDLogInfo(@"Push notifications were succesfully re-enabled");
} failure:^{
[self.missingPermissionsAlertView show];
}];
}
} else {
UIUserNotificationSettings *settings = [UIApplication.sharedApplication currentUserNotificationSettings];
source
share