Is there a way to change (replace) with code the incoming text messagge of a push notifications before or immediately after the push notification appears on the phone ?

有帮助吗?

解决方案

No. If you're app isn't running then your app doesn't get to even see the push notification before it is displayed to the user or even know its arrived.

If it was running when the push arrived then you can display a location notification (which to the user looks like the same thing).

However that's the situation for standard push notifications, with iOS7 your app could receive background silent push notifications* and then post a location notification to the user which would achieve the same thing you want.

(*provided the user hasn't explicitly terminated the app or it hasn't crashed)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top