推送通知在开发中工作正常,但设备在生产中没有收到通知 [英] Push notifications works fine in development, but device not getting notification in production

查看:151
本文介绍了推送通知在开发中工作正常,但设备在生产中没有收到通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我有一个应用程序在应用程序商店。在开发中一切工作正常我得到我发送的所有通知。我应该提到,我们正在使用Firebase进行分析,并推送通知,因为我们有iOS和Android版本的应用程序。 Firebase帐户拥有正确的开发和正确的生产许可证,应用程序的功能已正确设置,以在后台包含推送通知和远程通知。 b
$ b

在组织者窗口中,只要上传到应用商店或导出应用,apns-environement的权利就设置为生产。每当应用程序第一次安装,并运行警报,以允许推送通知显示。所以我的apns证书必须正确配置。
我是这家公司的合同的工作人员,刚开始3个月前,我讨厌这些人不好看我,但我真的不知道问题在哪里。我也使用了Xcode的自动代码签名选项,在这个mac的Xcode中签署了正确的配置文件和开发者帐号。 解决方案

刚刚通过这个,我不知道你是否解决了这个问题,我转身推掉,从苹果开发中心删除证书,并重新创建它们,这个使所有事情都按照原样进行。



我也有这行代码设置,

  FIRInstanceID .instanceID()。setAPNSToken(deviceToken as Data,type:FIRInstanceIDAPNSTokenType.sandbox)

我会改变它到 .prod 当我推送到应用商店。


Ok, so I have an app that is in the app store. In development everything works fine I get all of the notifications that I send. I should mention that we are using Firebase for analyics and push notifications as we have a iOS and Android version of the app. Firebase account has both the correct development and correct production apns cert, the app's capabilities are set correctly to include push notifications and remote notifications in the background.

In the organizer window the entitlement for apns-environement is set to production whenever uploading to the app store or when exporting the app. Whenever the app is first installed and ran the alert to allow push notifications is shown. So my apns certs have to be configured correctly. I am a working on contract for this company, just started 3 months ago, I would hate for these people to look at me in a bad light but I really don't know where the issue is. I am also using Xcode's automatic code signing option, with the correct provisioning profile and developer account signed in the Xcode on this mac.

解决方案

Just went through this and I do not know if you solved this,

I turned push off and deleted the certs from apple dev center and created them all over again and this made everything work as it should.

I also had this line of code set to,

FIRInstanceID.instanceID().setAPNSToken(deviceToken as Data, type: FIRInstanceIDAPNSTokenType.sandbox)

I will change it to .prod when I push to the app store.

这篇关于推送通知在开发中工作正常,但设备在生产中没有收到通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆