Handling Push Notifications when App is NOT running (i.e Totally Killed)

前端 未结 5 1313
孤城傲影
孤城傲影 2021-01-07 07:16

I\'m able to send push notifications to my IOS device. But when I click on that notification it just opens the app. No message is shown inside the app.

Code used by

5条回答
  •  死守一世寂寞
    2021-01-07 07:42

    The best way to handle things like this is to use deep linking within your APN. That will let you embed data that can then be handled within your app and direct the user to a specific event.

    Otherwise, you are limited to using the ApplicationDidEnterForeground method from your app delegate. Just put your alertView code in there and anytime your application is brought into the foreground that will run.

提交回复
热议问题