0

I have been working with urban airship push notification service for iOS for many times , It works , but in this last time I can't get the badge number when I receive the notification in iOS7 .

I use the normal web form for sending the notification alert and set the budge number as 1 as I always do .. but no budge appear , any body know why?

And how can I make that number increment automatically ? is it done by set the budge as +1?

rdurand
  • 7,342
  • 3
  • 39
  • 72
Twinkle
  • 430
  • 1
  • 5
  • 21
  • Show all the code where you increment the badge. Are you using `UIApplication`'s `applicationIconBadgeNumber` property? – Aaron Mar 20 '14 at 01:57
  • @Aaron No I just used the urban interface for assign the budge number , I was get that number before but now I don't and I don't know why – Twinkle Mar 20 '14 at 16:21

3 Answers3

0

Application badge count is an OS level function on Apple's side. Meaning, if you are sending "1", "+1", or "auto" (For Urban Airship's payload), then it should appear if you have that feature enabled on your device settings.

This is explained a little bit further here: http://support.apple.com/kb/ht3576

Essentially you will need to navigate to Settings > Notification Center > to then enable badge app icons for your app.

Donato Perconti
  • 814
  • 2
  • 11
  • 28
  • I checked that , it's set on but still can't get the badge number – Twinkle Mar 19 '14 at 21:05
  • Interesting.. have you registered for badge numbers in your application? http://docs.urbanairship.com/build/ios_features.html#automatic-integration EG: [UAPush shared].notificationTypes = (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert); [[UAPush shared] registerForRemoteNotifications]; – Donato Perconti Mar 20 '14 at 17:57
0
  • Did you check whether the badge notification is switched on for the application in the device?

enter image description here

  • The values do not increment, you will have to maintain the total number in the server and send it through the payload. So, if you are having 9 unread emails, you will have to send 9 in the payload as the badge number See here:Increment the Push notification Badge iPhone
Community
  • 1
  • 1
Anindya Sengupta
  • 2,539
  • 2
  • 21
  • 27
0

Are you sure when you used the UIApplication registerForRemoteNotificationTypes method that you specified badge number notifications as an option?

Here's the Urban Airship way of doing it:

UAPush* push = [UAPush shared];    
[push setNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
SomeGuy
  • 9,670
  • 3
  • 32
  • 35