Handling Push Notifications when App is Terminated

后端 未结 7 618
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 03:55

When my App is not running and receives a Push Notification, if I click on that notification, the App is launched - but then it doesn\'t prompt the user with the Alert-View

7条回答
  •  萌比男神i
    2020-11-30 04:33

    You can display the alert after launching a previously terminated app from a notification like this:

    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) { // display the alert }

提交回复
热议问题