簡體   English   中英

VOIP推送不會總是喚醒應用程序

[英]VOIP push won't always wake up app

我正在使用PushKit / voip push喚醒應用程序以獲取消息的應用程序。 這對於測試設備(殺死應用程序並可以在voip推送時喚醒)很有好處,但是對於某些用戶而言,它永遠不會喚醒。 他們正在使用最新的iOS和應用程序。

在用戶刪除/重新安裝應用程序后,我也發現它突然起作用了。

同樣,似乎大多數無法喚醒的設備已經安裝了很長的計時器(例如1-2年前),但它們都已更新為最新的應用程序。

我想知道1.這(很久以前安裝)如何影響應用程序的喚醒。 2.刪除/重新安裝如何幫助喚醒。 並且3.在不要求用戶重新安裝的情況下我可以做些什么來改進它。

謝謝!

在Pushkit PKPushRegistryDelegate ,有didInvalidatePushTokenFor可用。 如果沒有更長的pushkit令牌,則將調用此方法。 您可以使用API​​調用通知不向該特定設備發送通知(pushkit令牌)。 然后,您可以再次調用您的推送注冊方法,即您將收到的最新的推送工具令牌,該令牌可用於進一步的新推送通知。

     @method        pushRegistry:didInvalidatePushTokenForType:
     @abstract      This method is invoked if a previously provided push token is no longer valid for use. No action is
                    necessary to rerequest registration. This feedback can be used to update an app's server to no longer
                    send push notifications of the specified type to this device.
     @param         registry
                    The PKPushRegistry instance responsible for the delegate callback.
     @param         type
                    This is a PKPushType constant which is present in [registry desiredPushTypes].



@available(iOS 8.0, *)
optional public func pushRegistry(_ registry: PKPushRegistry, didInvalidatePushTokenFor type: PKPushType)

請參閱https://github.com/hasyapanchasara/PushKit_SilentPushNotification的更多詳細信息

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM