简体   繁体   English

推送未通过TestFlight收到的通知

[英]Push notifications not received via TestFlight

My app is currently being tested by testers via TestFlight. 我的应用程序目前正由测试人员通过TestFlight进行测试。 The problem is that they don't receive any push notifications sent. 问题是他们没有收到任何发送的推送通知。 It's working on my own device when connecting it to my mac and running the app directly from x-code. 当它连接到我的mac并直接从x-code运行应用程序时,它正在我自己的设备上工作。 I feel like I've tried almost everything, from changing certificate from dev to production to recreating a new production APNS certificate and build using a new profile referencing it, etc. 我觉得我已经尝试了几乎所有的东西,从将证书从开发改为生产到重新创建新的生产APNS证书,并使用引用它的新配置文件等进行构建。

I know this question has been discussed on other topics but I never found the right answer in my case. 我知道这个问题已经在其他主题上进行了讨论,但我从来没有在我的案例中找到正确的答案。 I can't post images here because I don't have enough reputation but I have relevant screenshots. 我无法在此发布图片,因为我没有足够的声誉,但我有相关的截图。 Any help is welcome :) 欢迎任何帮助:)

Elements to help diagnostic : 帮助诊断的要素:

  • It's working on my device when I run the app directly from x-code. 当我直接从x-code运行应用程序时,它正在我的设备上运行。
  • The testers are asked properly if they want to authorize push notifications on their devices (at least the first install, after if they want to get asked again they have to do what's described in Reset push notification settings for app ) 测试人员会被正确询问是否要在他们的设备上授权推送通知(至少在第一次安装后,如果他们想要再次询问他们必须按照重置推送通知设置中的描述进行操作
  • The registering is working because I can see their devices tokens in the logs (but I have the feeling that the token is always the same, no matter if the app is built with the production or the dev certificate, not sure if it's normal). 注册正在工作,因为我可以在日志中看到他们的设备令牌(但我感觉令牌总是相同的,无论应用程序是使用生产或开发证书构建,不确定它是否正常)。
  • I have an APNS Production certificate. 我有APNS生产证书。
  • I have a distribution profile, with “push notification” enabled. 我有一个分发配置文件,启用了“推送通知”。 It's linked with my “full” appID (and not the generic one with “*”). 它与我的“完整”appID相关联(而不是通用的“*”)。
  • I'm signin the build in release mode with the distribution certificate (not in debug mode), and I'm using the provisionning profile described above (the distribution one, linked with my app id) 我在发布模式下使用分发证书(不是在调试模式下)登录,我正在使用上面描述的配置文件(分发一个,与我的应用程序ID链接)
  • And when I check in the "binary & entitlements" window just before submitting the build I see the the provisionning profile is correct and that "aps-environment" is set to "production". 当我在提交构建之前检查“binary&entitlements”窗​​口时,我看到配置文件是正确的,并且“aps-environment”设置为“production”。
  • Server-side : The APNS call is made by using javapns ( https://code.google.com/p/javapns/ ) from a google app engine server. 服务器端:APNS呼叫是通过使用谷歌应用引擎服务器上的javapns( https://code.google.com/p/javapns/ )进行的。 Like I said the notification are correctly received on my own device so I guess this call is working. 就像我说的那样,通知是在我自己的设备上正确接收的,所以我猜这个通话是有效的。 We have a .p12 file generated from the APNS developpement certificate and a .p12 file from the APNS production certificate, and I've tried to make the call with both and it's not working. 我们有一个从APNS开发证书生成的.p12文件和一个来自APNS生产证书的.p12文件,我试图用两者进行调用,但它不起作用。 The server-side code hasn't change from the previous version and it was working in production with the app on the store. 服务器端代码没有从以前的版本更改,并且它正在使用商店中的应用程序进行生产。 The problem is really focused on testing with testflight. 问题主要集中在使用testflight进行测试。

Thank you all ! 谢谢你们 !

If you followed Ray Wenderlich's tutorial and you made everything work in development mode, the issue most likely comes the fact that you now need to create a new .pem-file for production mode. 如果您遵循Ray Wenderlich的教程并且您在开发模式下完成了所有工作,那么问题很可能就是您现在需要为生产模式创建一个新的.pem文件。

So, you need to perform exactly the same steps that you did with the development certificate (ie the .p12-file) you downloaded once more with the production certificate which you can obtain in the iOS dev center as well: 因此,您需要执行与使用您可以在iOS开发中心获得的生产证书再次下载的开发证书(即.p12文件)完全相同的步骤:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM