Reputation:
I followed this tutorial to implement push , in my iOS app , Apple Push Notification Services Tutorial
I did everything as stated and the push notifications work great. However , i dont see my app in the settings menu , so that i can be able to disable the push notifications if i like.
All i added to my code was :
In the delegate.m file :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
// Let the device know we want to receive push notifications
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
return YES;
}
and
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
NSLog(@"My token is: %@", deviceToken);
}
- (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
{
NSLog(@"Failed to get token, error: %@", error);
}
All i want is to be able to disable the push notifications. The tutorial states that i should have this options with the code above , but i dont see anything.
Upvotes: 0
Views: 335
Reputation: 7605
Are you checking in the right place? The right place is under Settings -> Notifications. The app does not appear in Settings list directly unless you actually have settings configured (and even when it does, the notification settings do not appear there).
Upvotes: 2