Error when running ionic cordova run ios - seems t

2019-07-26 04:31发布

问题:

I am trying to test cordova-plugin-firebase in my ionic v1 project.
I am getting an error when running

ionic cordova run ios 

If I run the command

ionic cordova build ios

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.

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"

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

回答1:

try this both :-

Under Code Signing Identity, change iPhone Distribution to iPhone Developer for Debug section. push notifications :- go Target-> Capabillities and turned on push notifications.