0
Dans iOS 10.3 J'ajoute le code, la AppDelegate
:Touchez Notifications locales n'est pas déclenchée
@interface AppDelegate() {
UNUserNotificationCenter *center;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
center = [UNUserNotificationCenter currentNotificationCenter];
UNAuthorizationOptions options = UNAuthorizationOptionAlert + UNAuthorizationOptionSound;
[center requestAuthorizationWithOptions:options
completionHandler:^(BOOL granted, NSError * _Nullable error) {
if (!granted) {
DLog(@"Something went wrong");
} else {
DLog(@"Access Granted")
}
}];
return YES;
}
je tape la notification, mais le soufflet de la méthode n'est pas appelé.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification