Urban Airship receivedBackgroundNotification never called

寵の児 提交于 2019-12-11 16:35:13

问题


After reading all the guides, and after checking hundred of articles on the internet, I'm quite sure that the method receivedBackgroundNotification is never called.

Everything works perfect, but when the app is in background, a notification is shown and this method never is called. Seems to be impossible to get it working.

Assuming all the normal operations and the basic configuration is well done and is working, what can I do to intercept and manage background push notifications with this library?

I will appreciate a lot any help.


回答1:


Make sure you have the following configured:

  • Remote notifications background mode enabled in the target's capabilities
  • Background app refreshed is enabled on your test device
  • Assuming you are trying to use the UAPushNotificationDelegate, make sure you either have automatic setup enabled or you are forwarding all the proper methods to UA SDK.

Apple will only wake up your application if you send the push notification with content-available=1 in the payload. The option is exposed in the composer as "background processing" or you can set it in the iOS overrides when using the push api.



来源:https://stackoverflow.com/questions/50687659/urban-airship-receivedbackgroundnotification-never-called

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!