1

My purpose: One Push Notification to iOS app, badgeNumber on device need to update based on each device's badge increment.

  • We knew that we can send only one message (payload) to different tokens
  • in iOS, We cannot update badge number even we receive remote notification when App is forced to close from background.
  • I want to use above method to send Different Badge Number to each device, since I get badge number for device from my DB Server.
  • I used FCM for iOS push notification
  • for Server-side, I use PHP

Some discussion(Android GCM - Send different payload to each user in registration_ids array ) said it's not possible, so is there any way or paid service?

Some said we need to send each payload to each device tokens using loop. Example, I have 1000 tokens, will APNS block my future request?

For my app's usage: around 50 push/day

Thank for your contribute.

AL.
  • 36,815
  • 10
  • 142
  • 281

1 Answers1

0

Some notes to your comment:

You can update badge if the application is dead, but it cannot be a silent notification, if silent it will simply ignored. Using a "normal" notification with badge in payload you can, in fact update it even killed manually.

You must keep in database all the device token with user associated, and send individual notification, you can't send bulk message with different content (in this case with different badge).

No, it will not block, you can send for each one: This is from another forum but can be used as reference:

According to the "Push Notification Troughput and Error Checking" section of this Tech Note:

https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG44 "There are no caps or batch size limits for using APNs." "If you're seeing throughput lower than 9,000 notifications per second, your server might benefit from improved error handling logic."

teixeiras
  • 101
  • 8
  • we take sometime to implement and observe, we implement loop to push notification to each device token (iOS) with different BadgeNumber, but consequently, the notification cannot reach device in short time, and some notification is not been sent to device. Any more recommendation? – Leanghong Oeng Jun 21 '17 at 08:39