简体   繁体   English

TestFlight和推送通知

[英]TestFlight and push notifications

When I install my app using Xcode by plugging in my iPhone to my Mac and running the project I get notifications. 当我使用Xcode通过将iPhone插入Mac并运行项目来安装应用程序时,会收到通知。 When I upload it to TestFlight and then I go on the TestFlight version I won't get notifications from my app. 当我将其上传到TestFlight,然后继续使用TestFlight版本时,我不会收到来自应用程序的通知。

I honesty believe I'm doing something wrong with my entitlements or distribution profile. 老实说,我认为自己的权利或发布个人资料有误。

I'm using onesignal for my notifications 我正在使用onesignal进行通知

Sorry, about the more strict of voters. 抱歉,选民比较严格。

When you're working with "push notifications" they only work on an actual device.. NOT on the simulator.. 当您使用“推送通知”时,它们仅在实际设备上工作。在模拟器上不行。

So when you're device is plugged in the "UUID that iOS sends back to Apple with the Push Notification details gets sent". 因此,当您插入设备时,“ iOS将通过发送推送通知详细信息将iOS发送回Apple的UUID发送”。

When you're using the simulator, then you don't have any push notifications or (APNS notifications). 使用模拟器时,没有任何推送通知或(APNS通知)。

So ideally develop in the simulator, and post an "NSLog (debugLog etc..)" in simulator, and when you're back on your device being plugged in , then you can use push again. 因此,理想情况下是在模拟器中进行开发,然后在模拟器中发布“ NSLog(debugLog等。)”,当您重新插入要插入的设备时,可以再次使用push。

What you are experiencing is due to the 2 APNS environments. 您遇到的是由于2个APNS环境。 The first environment is sandbox, which is when you are developing the on your phone. 第一个环境是沙箱,即在手机上进行开发时的环境。 You seem to have that working. 您似乎正在工作。 The next is production, which even though Testflight is for testing, it still uses the production level APNS environment. 第二个是生产,即使Testflight用于测试,它仍然使用生产级别的APNS环境。 Check your provisioning profiles and ensure you have the proper certificates for production level APNS. 检查您的配置文件,并确保您具有用于生产级别APNS的正确证书。 Once you do, you should see your push notifications come in for your TestFlight builds. 完成后,您应该看到推送通知进入了TestFlight构建。

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

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