29
votes

I have an Ionic 2 app, which builds and is testable in Xcode 8.2.1 Simulator environment, e.g. iPhone7 (Build Successful).

enter image description here

When I try Archive the app to create an ipa file to set on a device, I follow these instructions. But Product -> Archive is greyed out. So I change the active scheme to Generic iOS Device.

enter image description here

But then when I click Product -> Archive, I get Build Failed.

theWhoZoo has conflicting provisioning settings. theWhoZoo is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.2'

enter image description here

If anyone could advise how I can fix this to build an Archive, I would appreciate it.

8
You need apple developer premium account, Once you purchase, add new account in settings of Xcode & sign the IPA with new profiles, see more on apple developer programs developer.apple.com/support/compare-membershipsImad Ali
Thank you, I will have a look. Does that mean on iOS, for development (no paying), toy can't test an app on an actual devise?Richard
I do have a development (individual) Apple ID already set up, so I don't think that's the reason for the above errors.Richard

8 Answers

114
votes

This worked perfectly for me. Give a try :)

Step 1:

Select the Project Target-- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.

Step 2:

Uncheck "Automatically manage signing", then check it again and reselect the Team. Xcode then fix whatever was causing the issue on its own.

42
votes

The problem is in Code Signing Identity. This is a new problem that showed up on the latest release of Xcode. Go to Code Signing Identity, then add other and type in "iPhone Developer" as shown in the error message and save then this will display.enter image description here

If this does not work show me your General signing. and your Code Signing Identity from both your Project and your Targets

6
votes

The problem is in Code Signing Identity. This is a new problem that showed up on the latest release of Xcode. Go to Code Signing Identity, make all IOS Developer rather that IOS distribution.

3
votes

UPDATE Just figured out the real issue [assuming that your app has the correct provisioning profiles, but a target for your app does not]: Navigate to your target and change the provisioning profile there. See below: enter image description here enter image description here


I got this error when I added a target to enable rich push notifications. The project/workspace, "Spontit" did not have this error but the target "RichNotification" did.

I tried several things, and the last thing I did, that seemed to be responsible for it finally working, was:

  • Un-add and re-add the embedded binary for the target "RichNotification" in the "General" tab of the project, "Spontit". enter image description here

  • Another thing to check is to make sure that it is added as a "Target Dependency" in the "Build Phases" tab. enter image description here

  • For this particular problem, make sure to clean your project (Cmd Shift K) before building it, every time. Otherwise, you might fix it and try to build it and think it's not working, but really it's using the old settings- so clean it first.
1
votes

For me Only this worked.I tried changing the Provisioning Profile(Deprecated) Value to Automatic.


enter image description here


This worked for me and I hope it would be helpful for someone.

1
votes

Project Target -> Build Settings -> Code Signing Identity -> Change the Debug and Release to iOS Developer and iOS Distribution.

0
votes

If you have error message like this: [target name] is automatically signed, but provisioning profile xxxxx-xxxx-xxxx-xxx-xxx has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.

You can fix like this: 1. Check Automatically code sign in 2. Uncheck Automatically code sign in, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own 3. If still not work, find project.pbxproj, search the profile, and just delete that line, then save it.

This work for me!

-1
votes

HERE IS THE FIX

FOLLOW THESE STEPS: open your project in xcode, in my case I used xcode 9.

INSIDE THE GENERAL TAB DO THE FOLLOWING

UNCHECK THE FOLLOWING OPTION: Automatically manage signing

THEN SIGN YOUR DEBUG PROFILE provisioning profile should be your development profile from the dropdown Team : will be populated because of the above provisioning profile Sigining Certificate: will be populated.

THEN SIGN YOUR RELEASE PROFILE provisioning profile should be your release profile from the dropdown Team : will be populated because of the above provisioning profile Sigining Certificate: will be populated.

That is all, clean and archive your project.