iOS Push Notification: cannot find vaild connection

隐身守侯 提交于 2019-12-04 05:56:21

What cause the error is that you have a device in the installation table that matched the filter on the push request that is no longer registered in Apple for your app. When Apple receives a request for a notification to a device that is no longer registered to your application it returns that message to indicate you should take some action if it continues to happen.

In my case I have four devices registered in the installation table that matched my push filter and two of those devices are no longer registered in Apple for my app so every time I push it get that error for each of invalid installations.

I'm not sure why it happens but I've seen the following scenarios that causes a new installation record to be created that invalidates the prior installation. It seems like something the parse service could monitor and take action for after getting so many errors for that device token with no successful pushes between errors.

  1. The user deletes and re-installs the app
  2. The user updates their iOS version and the deviceToken value is changed.
  3. The connection url to the parse service is updated in the app by changing a configuration setting without having to reinstall the app.

To resolve the errors you simply need to remove the installation that matches the deviceToken in the error message

You should probably configure the production certificate as well. Also note that apple now issues universal push certificates, you should use that one as it will work for acquired deviceTokens both with development and production bundles.

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