Reputation: 3319
When I run the app on my iOS 7 device, the app doesn't appear on the device notifications settings and doesn't sounds when a notification is being fires. Only after the first notification is being fired, I can see my app under the list of the notification settings with sounds turned off.
Why doesn't the app show in the notifications list initially?
Why are the sounds turned off by default?
On iOS 5&6 I don't have these problems. These are local notifications.
Upvotes: 13
Views: 3050
Reputation: 3508
Hmm, Interestingly, I changed the order of
notification.SoundName = UILocalNotification.DefaultSoundName; notification.ApplicationIconBadgeNumber = 1;
to
notification.ApplicationIconBadgeNumber = 1; notification.SoundName = UILocalNotification.DefaultSoundName;
and it works now. When the app is running in background, the local notification fires and plays the default notification sound.
Upvotes: -1
Reputation: 518
I got this same problem. What i found out was, i have a piece of code that caused this all along.
In my AppDelegate didFinishLaunchingWithOptions, i have implemented:
//remove this if you have it
[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0]; //to reset the badge everytime the app loads
So what i did, I removed that code & redeploy the app. Now it has ON default value in Notification Center.
Phew.
Upvotes: 0
Reputation: 11
Have you set the applicationIconBadgeNumber in "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions"? Comment this code, and try again.....I don't why, but I got the same problem. After I commented this line, my app works correctly.
Upvotes: 1