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?

2
  • Show all the code where you increment the badge. Are you using UIApplication's applicationIconBadgeNumber property?
    – Aaron
    Mar 20, 2014 at 1: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, 2014 at 16:21

3 Answers 3

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.

2
  • I checked that , it's set on but still can't get the badge number
    – Twinkle
    Mar 19, 2014 at 21:05
  • Interesting.. have you registered for badge numbers in your application? docs.urbanairship.com/build/… EG: [UAPush shared].notificationTypes = (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert); [[UAPush shared] registerForRemoteNotifications]; Mar 20, 2014 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
2
  • I checked the setting it's on but still can't get the badge
    – Twinkle
    Mar 19, 2014 at 21:06
  • Urban Airship has it's own record of the user's Badge count, so they allow you to use +1 in the payload
    – SomeGuy
    Mar 20, 2014 at 1:52
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)];
3
  • could you give a detail for that? I don't do anything in this method
    – Twinkle
    Mar 20, 2014 at 16:23
  • @Twinkle I edited my answer to add some code for this.
    – SomeGuy
    Mar 22, 2014 at 2:41
  • Yes , I did that @SomeGuy
    – Twinkle
    Mar 24, 2014 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.