gpt4 book ai didi

ios - 我无法发送推送通知来测试 Flight Expo 独立应用程序

转载 作者:行者123 更新时间:2023-11-28 23:56:21 26 4
gpt4 key购买 nike

我的应用程序需要一个从我们的服务器接收远程通知的功能。它在 expo 和模拟上工作正常,但在独立的 iOS 上,它向我显示这样的错误

enter image description here

我通过试飞安装此应用程序,其中“通知”权限返回状态为“未确定”,因此我尝试获取设备 token 并返回如上图所示的错误。

当我提交app试飞时apple给我发警告邮件

Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature’s entitlements do not include the “aps-environment” entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the “aps-environment” entitlement. Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.

似乎是功能部分的推送通知未启用(通常在 native 项目中我在 Xcode 中设置它),如何在 expo 上启用它?

最佳答案

我已经通过重建独立应用程序解决了这个问题,并让 expo 处理我的证书以进行推送和提供。

关于ios - 我无法发送推送通知来测试 Flight Expo 独立应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51203729/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com