推送通知在开发中工作正常,但设备在生产中没有收到通知 [英] Push notifications works fine in development, but device not getting notification in production
问题描述
$ 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屋!