I have the following issue: "My app receive some remote notifications from an own server just to show to the user some practical information. I am not using a icon badge, because I don't need it. If the application user touch the remote notification from the iOS Notification Center my application can catch it without any problem, I receive the options from application:didFinishLaunchingWithOptions:
or, if the application is open I catch the remote notification with application:didReceiveRemoteNotification:
selector. But, now I want to remove these notifications from iOS Notification Center because It is just a message and I have been looking for the answer in another posts and I've tried these solutions in my app and they don't work"
Some solutions were the next:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[application cancelAllLocalNotifications];
application.applicationIconBadgeNumber = 0;
...
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
...
if (launchOptions) {
[application cancelAllLocalNotifications];
application.applicationIconBadgeNumber = 0;
}
...
}
And the remote notification still in the iOS Notification Center, how can I remove from that place without any tricky code or is an iOS SDK issue? I don't think that an issue was possible because Tweetbot app remove its remote notifications from iOS Notification Center after you enter to the app.
Regards!