Loading plugin.xml +2 −1 Changes for plugin.xml: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ <platform name="ios"> <config-file target="config.xml" parent="/*"> <feature name="LocalNotification"> <param name="ios-package" value="APPLocalNotification"/> <param name="ios-package" value="APPLocalNotification" onload="true" /> <param name="onload" value="true" /> </feature> </config-file> Loading src/ios/APPLocalNotification.m +21 −1 Changes for src/ios/APPLocalNotification.m: 21 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ - (UILocalNotification*) notificationWithProperties:(NSMutableDictionary*)options; // Ruft die JS-Callbacks auf, nachdem eine Notification eingegangen ist - (void) didReceiveLocalNotification:(NSNotification*)localNotification; // Ruft die JS-Callbacks auf, nachdem eine Notification eingegangen ist - (void) didFinishLaunchingWithOptions:(NSNotification*)notification; // Hilfsmethode gibt an, ob er String NULL oder Empty ist - (BOOL) strIsNullOrEmpty:(NSString*)str; // Fires the given event Loading Loading @@ -300,12 +302,30 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION"; } } /** * Ruft die JS-Callbacks auf, nachdem eine Notification eingegangen ist. */ - (void) didFinishLaunchingWithOptions:(NSNotification*)notification { NSDictionary* launchOptions = [notification userInfo]; UILocalNotification *localNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey]; if (localNotification) { [self didReceiveLocalNotification:notification]; } } /** * Registriert den Observer für LocalNotification Events. */ - (void) pluginInitialize { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didFinishLaunchingWithOptions:) name:UIApplicationDidFinishLaunchingNotification object:nil]; } /** Loading Loading
plugin.xml +2 −1 Changes for plugin.xml: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ <platform name="ios"> <config-file target="config.xml" parent="/*"> <feature name="LocalNotification"> <param name="ios-package" value="APPLocalNotification"/> <param name="ios-package" value="APPLocalNotification" onload="true" /> <param name="onload" value="true" /> </feature> </config-file> Loading
src/ios/APPLocalNotification.m +21 −1 Changes for src/ios/APPLocalNotification.m: 21 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ - (UILocalNotification*) notificationWithProperties:(NSMutableDictionary*)options; // Ruft die JS-Callbacks auf, nachdem eine Notification eingegangen ist - (void) didReceiveLocalNotification:(NSNotification*)localNotification; // Ruft die JS-Callbacks auf, nachdem eine Notification eingegangen ist - (void) didFinishLaunchingWithOptions:(NSNotification*)notification; // Hilfsmethode gibt an, ob er String NULL oder Empty ist - (BOOL) strIsNullOrEmpty:(NSString*)str; // Fires the given event Loading Loading @@ -300,12 +302,30 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION"; } } /** * Ruft die JS-Callbacks auf, nachdem eine Notification eingegangen ist. */ - (void) didFinishLaunchingWithOptions:(NSNotification*)notification { NSDictionary* launchOptions = [notification userInfo]; UILocalNotification *localNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey]; if (localNotification) { [self didReceiveLocalNotification:notification]; } } /** * Registriert den Observer für LocalNotification Events. */ - (void) pluginInitialize { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didFinishLaunchingWithOptions:) name:UIApplicationDidFinishLaunchingNotification object:nil]; } /** Loading