When is didRegisterForRemoteNotificationsWithDeviceToken called?

前端 未结 3 2110
日久生厌
日久生厌 2021-01-03 18:30

There are a lot of questions about didRegisterForRemoteNotificationsWithDeviceToken but they all sidestep a very direct question which I cannot seem to find an exact answer

3条回答
  •  梦谈多话
    2021-01-03 18:53

    When the app is first run it will ask the user whether they will allow remote notifications. If they say yes then it will fire didRegisterForRemoteNotificationsWithDeviceToken at that time and every time after it will fire this function when the app is first opened. If they say no then it will not be fired unless they went into settings and allowed notifications on the app.

提交回复
热议问题