Apple push notifications acting weird
When I started coding th开发者_开发问答e notifications, they were handled in one of 2 ways.
If the app wasn't open or the phone was locked, the user would get the alert with a "view" button to open the app.
if the app was open, the alert was handled in the app delegate.
Now that I have deployed the app, if the phone is locked, the user recieves the notification but if they unlock the phone, the app is opened and the notification is lost.
Is there something I need to send along with the payload that is making it behave like this? or am i doing something wrong?
If the notification is recieved when the app is open, the app deals with it ok, if the notification is recieved when the app is closed but the phone isn't locked it works ok. It's only if the phone is locked that the issue arrises (most common use case!)
cheers
Apparently this is standard behaviour! odd...
精彩评论