apple push notification with sound buzzing at regu

2019-03-06 07:15发布

I have a small but tricky question over apple push notification payload on iOS.

From what I know the push notification payload can have sound (length <= 30 seconds), text and badge. Now what I want with my iphone app is that the push notification sent by my provider (server) to this app on iPhone screen to constantly buzz at regular interval (say every 1 min) until user taps on the notification on screen (i.e. checks the message). Hence, the notification would play the sound constantly and stops when user taps and launch the app.

Is it feasible? How?

PS: Its an enterprise application and would not be deployed on App Store.

Thanks in advance.

1条回答
Deceive 欺骗
2楼-- · 2019-03-06 07:55

Yes, it is. This is how you could implement that:

  1. Register device for push notification
  2. Send out a push message with ref to a sound every 30-60 seconds
  3. Invalidate each message after 30-60 seconds, making room for the new one
  4. When user re-opens the app, register the app as re-opened to the server and stop sending out push notifications

I do not know how this would look in the notification center, but you can test and have a look :)

查看更多
登录 后发表回答