运行 ionic cordova run ios 时出错 - 似乎与推送通知有关 [英] Error when running ionic cordova run ios - seems to be related to push notification
问题描述
我正在尝试在我的 ionic v1 项目中测试 cordova-plugin-firebase.
运行时出错
I am trying to test cordova-plugin-firebase in my ionic v1 project.
I am getting an error when running
ionic cordova run ios
如果我运行命令
ionic cordova build ios
我没有收到任何错误消息.此外,如果我在 Xcode 中打开项目并尝试在模拟器(iphone 8)中运行该应用程序,它会成功运行,但在 xcode 中使用设备运行该应用程序(iphone 4s) connected 运行时也显示同样的错误
I don't get any error message. Also, if I open the project in Xcode and try to run the app in a simulator(iphone 8), it successfully runs but running the app in xcode with a device (iphone 4s) connected also shows the same error when running
ionic cordova run ios.
我收到的错误是自动签名无法解决nativeApp"目标的权利问题.自动签名无法将 aps-environment 权利添加到您的配置文件中"
The error I am getting is "Automatic signing is unable to resolve an issue with the "nativeApp" target's entitlements. Automatic signing can't add the aps-environment entitlement to your provisioning profile"
我看到解决此问题的方法之一是在您的目标 > 功能"下启用推送通知.但是当我在项目导航器中时,我似乎无法在 Xcode 中找到这个选项.我目前使用的是 XCode 9.1
I saw that one of the solution to this problem is to enable push notification under your "target > capabilities". But I can't seem to find this option in Xcode when I'm in the project navigator. I am currently using XCode 9.1
推荐答案
试试这两个 :-
在代码签名标识下,将 iPhone Distribution 更改为 iPhone Developer for Debug 部分.推送通知:- 转到目标-> 功能并打开推送通知.
Under Code Signing Identity, change iPhone Distribution to iPhone Developer for Debug section. push notifications :- go Target-> Capabillities and turned on push notifications.
这篇关于运行 ionic cordova run ios 时出错 - 似乎与推送通知有关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!