How do I manage three provisioning profiles in my build schemes?
I am confused because of the fact that there are 2 options per scheme, i.e. Debug and Release.
If I have a "working" scheme for debugging my app on my iPad connected to my Mac I simply set Debug build and use the Developer Provisioning profile for this.
When I select my Ad-Hoc distribution scheme, I select my Release Build which has the Add-Hoc distribution profile set up so that I can distribute the app to the iPads registered in this profile via our website.
But now I want to attach another provisioning profile, the one for iTunes Store distribution, which should also be a Release build, but the Ad-Hoc Provisioning profile is already assigned to Release, so, to clarify my question:
Is it possible to create another Build configuration, something like "iTunes Release", to which I can assign the iTunes distribution profile. Or is it somehow possible to use different Provisioning profiles with different schemes.
To make a long story short:
In xCode there is a link between Build - Provisioning Profile - Scheme
Where IMHO there should be a link between Scheme - Build - Provisioning Profile.
If you click on your project in the project navigator (the panel on the left), then make sure you're on the "Info" tab, you can add a new configuration there. Is that what you're looking for?
Related
I have just updated to Xcode 8 and I now have two options for app signing, Provisioning Profile and Provisioning Profile (Deprecated).
Why is one deprecated, and what is the difference between the two?
Update 2017/02/13
User interface for managing signing certificates and provisioning profiles has been changed at Xcode 8.3 beta 2.
Changed the user interface for managing signing certificates and
provisioning profiles. Certificates are managed from the Accounts
preferences pane by selecting a team and clicking Manage Certificates.
Automatically managing signing is recommended, however if your app
requires manually signing provisioning profiles are managed in the
General tab of the project editor. Use the Provisioning Profile
dropdown to import or download profiles. In addition it displays
profiles that match the current signing configuration of the target.
(28641027)
Why is one deprecated?
I think Its deprecated because the signing system has been rewritten in Xcode8.
The signing system has been rewritten to include a new mode for
automatically managing signing assets, in addition to a dedicated
manual mode where the profiles for the target must be explicitly
selected. When automatically managing signing assets, Xcode will
create signing certificates, update app IDs, and create provisioning
profiles. For manual mode, only custom created profiles can be
selected and Xcode will not modify or create any signing assets. Xcode
now encodes profiles in the target using the
PROVISIONING_PROFILE_SPECIFIER build setting. This setting allows
specifying both the team ID and the name or identifier of the profile.
There are some Signing relate known Issues with Xcode 8.1 you should known.
So maybe we should not set Provisioning Profile in Build Setting tab, switch to General tab , and set in Signing category instead.
If you set provisioning profile in Build Setting and enable Automatically manage signing in General tab Xcode will complain about that.
What is the difference between the two?
I also updated to XCode 8 and ran into this as well. Both the Provisioning Profile and Provisioning Profile (Deprecated) were set as blank on my project in XCode 8.
I tried setting them back to what they were for each environment but the Debug environment had all of the options in the dropdown removed.
After creating an Archive and uploading to iTunes Connect I got a notice that the provisioning profile wasn't quite correct, which was working fine prior to XCode 8.
Following what the others have posted about XCode 8 getting an update to its Signing, I went to the general tab and noticed a new section that allows you to have XCode automatically manage the signing. I checked that box and now it looks like this:
I have not uploaded a new Archive to iTunes Connect yet but when I do I'll add an update here to see if it's resolved the Provisioning Profile warning.
UPDATE:
After selecting Automatically manage signing in XCode and re-sending to the App Store it's still complaining so that didn't quite work. Might have to remove and re-create all provisioning profiles to get this working. What a pain. Thanks Apple.
In Provisioning Profile (Deprecated) description, information is The UUID of a valid provisioning profile. A missing or invalid profile will cause a build error (deprecated, use [PROVISIONING_PROFILE_SPECIFIER] instead).
I found the link https://possiblemobile.com/2016/06/code-signing-xcode-8/.
Please follow these steps
Select project TARGET and go to GENERAL tab
Under Signing check the option Automatically manage signing
Hope that helps !
Now, I have both, a Development as well as Distribution certificate when I view my Apple Developer portal at developer.com/ios . But when I view the certificates via Xcode, I just get the Distribution profile now matter what I try . Please provide a solution to get the Development profile in Xcode
I have tried creating a Developer profile using Xcode itself, but to no success.
I have one device added to my device List
Download the provisioning profiles and save them to somewhere you can access them. Then, double-click the profiles and certificates. This should bring up Xcode as well as Keychain. You can dismiss the windows and that should work.
In Xcode, go to build phases and check that under Development and Distribution certificates the corresponding ones are correctly filled in.
Xcode 5 keeps creating a developer provisioning profile for one of my apps that I don't need. I have already tested the app with the Xcode Team Provisioning Profile and released it with another distribution profile and I do not require a development profile with a specific bundle id.
How do I stop Xcode from creating it?
Unfortunately, you don't!
I contacted Apple Developer Technical Support and sent them the following:
DESCRIPTION OF PROBLEM - How do I import existing distribution Provisioning Profiles from the Provisioning Portal into Xcode 5 but without Xcode creating/managing new development "iOS Team Provisioning Profiles"? Another way to ask the question is, how do turn OFF Xcode Managed Provisioning Profiles, but still import existing profiles from portal?
STEPS TO REPRODUCE In the Provisioning Portal create a new bundle id and then create a new distribution provisioning profile. (but do NOT create a development profile). From within Xcode, go to Preferences > Accounts > Click Team Name > View Details > Click Refresh button. Xcode will now create a development profile that I do not want created, it will show up in both Xcode and the Provisioning Portal. I do NOT want Xcode to create any new profiles... I only want it to import all existing ones that are in the portal.
This was the response I got back from Apple Developer Technical Support:
Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations. If you would like for Apple to consider adding support for such features in the future, please submit an enhancement request via the Bug Reporter tool at: http://bugreport.apple.com
So it appears that Apple has added a new feature (Xcode Managed Profiles) with no way to turn it off, and with the side effect of it creating unwanted provisioning profiles.
So please submit a bug report to http://bugreport.apple.com and specifically ask for the following... Ability to import provisioning profiles from provisioning portal along with the ability to turn off Xcode Managed Profiles.
This has been asked before, but the answers to previous questions are not solving my issue.
I'm trying to build a simple Hello World app called (CalculatorBrain) from Stanford iTunes U courses. I can run it in the Simulator fine, but I'd like to get it on my iPhone 4S.
I sync my iPhone 4S through iTunes on my Windows machine. Always have. Figured I should list this detail.
Anyway, back to my Macbook (Mountain Lion). I'm running the most recent XCode 4.6.2 (4H1003) and my iPhone is also the most recent at 6.1.3 I believe.
I went to the Provisioning Portal at the Apple developer page. I added my 4S. I called it JohnSmith, and gave it the phones UDID.
In XCode, I opened the Organizer, Devices is highlighted by default. I put the passcode in my iPhone, and plugged it into my Macbook. Devices finds my iPhone. If I click on Provisioning Profiles and try 'Add Device to Provisioning Portal', I get a "A device with number already exists on this team." Great. I know it's added for sure then. All good news so far.
In my Hello World app, CalculatorBrain-Info.plist my Bundle Identifier is "com.JohnSmith.CalculatorBrain". Bundle display name is "${PRODUCT_NAME}" and executable file is "${EXECUTABLE_NAME}" if that matters.
In the Navigator, if I highlight my project, and bring up the Build Settings, under Code Signing Identity I get the options...
Don't Sign Code
Automatic Profile Selector
- iPhone Developer
- iPhone Distribution
Identities without Provisioning Profiles
- iPhone Developer: John Smith (R............K)
- iPhone Distribution: John Smith (Y.............5)
Other...
I've tried all of these. I'm assuming I'm supposed to use the iPhone Developer: John Smith one... but it's saying it's an identity without Provisioning Profiles.
What's going on here? What do I need to do to get this to work?
Based on your description, it sounds like the missing element is that you need to go back to the 'Certificates, Identifiers, and Profiles' tool, generate a Development Provisioning Profile for the AppID of your HelloWorld app, then install that profile on your development machine. At a high level, this is composed of the following steps:
Locate the AppID for your project in Xcode.
Verify that you've setup that AppID in 'Certificates, Identifiers, and Profiles'.
Create a Development Provisioning Profile for that AppId, your development certificate, and one or more registered test devices.
Download and Install the Provisioning Profile in Xcode.
Configure your project to Code Sign using this Profile and Linked Code Signing Identity.
Build to device!
The 'Code Signing Identity' build configuration item you have mentioned is very much dependent on both your project's settings as well as the Provisioning Profiles available on your development machine. I recently answered a tangentially related question 'What are code signing identities?' that may be helpful in seeing what information Code Signing is using and how you can check that you've got your development machine setup to be able to Code Sign your project.
...and now, on to more specific HOWTOs to help work through your Code Signing question:
Locating Project's AppID
The AppID uniquely defines an application in the iOS ecosystem and is one of the things you first create when starting a new Xcode project. This AppID is what you need to register in the 'Certificates, Identifiers, and Profiles' tool to get started with Provisioning.
In the Project Navigator (CMD+1), click on your project name (likely 'CalculatorBrain'). This will present the project's settings.
Select [Your Project Name] > Summary Tab as shown in the screen clipping from above (MyiOSApplication).
Your iOS AppID is presented in the 'Bundle Identifier' field. Snag a copy of this string, you'll need it next.
Verify (or Setup) the AppID
Navigate to http://developer.apple.com/ios and access the 'Certificates, Identifiers, and Profiles' tool.
After logging in, select 'Identifiers'.
Check that the AppID you found in the previous section is present in the list of App Identifiers. If so, take note of the App ID Name and skip to the next section, otherwise...
Click the 'Add' (Plus) button in the upper right corner, provide a name for this App ID (can be whatever you want, just so long as it doesn't have special characters.)
Scroll to the bottom of the page, and paste a copy of your App ID from the previous section in the 'Bundle ID' field. under 'Explicit App ID'.
Click 'Continue'.
Do note that the AppID must be unique across the iOS Ecosystem -- you may get an error if the AppID you've selected is already in use. If so, change your 'Bundle ID' to something unique -- just be sure to update the 'Bundle ID' setting in your Xcode project to match whatever you settle on.
Creating a Development Provisioning Profile
Now that the App ID is registered, you are now ready to create a Development Provisioning Profile linking your App ID, Development Certificate, and Test Device ID(s) together.
Within the 'Certificates, Identities, Profiles' tool, navigate to 'Provisioning Profiles'.
Click on the 'Add' (Plus) button in the upper right corner.
Select 'iOS App Development' in the 'Select Type' step and then click 'Continue'.
Select your App ID from the drop down list of App IDs and then click 'Continue'.
Check the box next to your Development Certificate and then click 'Continue'.
Check the box next to the test device(s) you want to authorize to install this app and then click 'Continue'.
Key in a Profile Name (again omitting special characters) then click 'Generate'.
Download and Install Provisioning Profile
Once the Provisioning Profile is generated, the tool will provide you with a link to be able to download
Download the Provisioning Profile by clicking on the 'Download' link.
Drag Provisioning Profile from your Download location and drop it on the Xcode Dock Icon or double-click to open it.
Configure Code Signing Identity
Sounds like you already know where this is located, but just in case:
In the Project Navigator (CMD+1), click on your project name (likely 'CalculatorBrain'). This will present the project's settings.
Select [Your Project Name] > Build Settings Tab.
Scroll to the 'Code Signing Identity' item.
In theory you would like to use the 'Automatic Profile Selector' option which will attempt to match your AppID to an installed Provisioning Profile, but you can also scroll through the list and pick a specific mapping of Bundle ID/AppId to iOS Certificate.
Also, my own Xcode doesn't always seem to catch on to changes to freshly-installed provisioning profiles -- It is unclear if this is just a quirk of my own Xcode install or if there is a bug in Xcode. Either way, quitting and relaunching Xcode seems to trigger a reindex/refresh of profiles.
Anyway, select the option that matches your AppId/BundleId and your Developer Certificate.
Assuming the problem was a missing/incomplete/expired Provisioning Profile, then this should help get you up and running. If not, we'll have to dig into other potential settings or certificates issues that could be tripping up your Code Signature operation.
I had very similar kind of problem, tried every option to those Code Signing's and the actual solution to mine was:
- Restarted Xcode
- Go to "Window->Organizer"
- Then "Editor" and
- "Refresh from Developer Portal"
Then I just "Set the active scheme" to "iPhone (Petri)" on beside the Run and Stop buttons.
Please make sure Targets is checked instead of projects.
In my case device has 3 provision profiles of the same name. During development I updated provision profile a few times and every time new updated profile was added to device without removing the old one. So xcode searched first provision profile wich was wrong at that moment and throwed error in my face.
So, what should you do:
Open "Devices" window (Cmd + Shif + 2)
Search for your Device and select It
In the left bottom corner press on the "settings" button
Press "Provision profiles"
Search for dublicates. I found 3 items of profiles with the same name
removed all but the latest one
I followed the steps provided in apple developer documentation for wireless distribution, as written below:
In Xcode, you create an app archive using the “Build > Build and Archive” menu item. Then, in the Archived Applications source in Xcode's Organizer, select the app and click the “Share Application…” button. Then click the “Distribute for Enterprise…” button. You’ll be asked to provide information for the manifest file, which Xcode creates. See below, for information about the manifest file.
When I click on “Distribute for Enterprise…” button, nothing happens. I mean, it does not ask anything. I have used an Adhoc distribution profile and have selected Device 4.0.
I have used an Adhoc distribution
profile and have selected Device 4.0.
Please suggest, where am I doing
mistake.
You can't use an Adhoc distribution, you need to make a Distribution Provisioning Profile to sign your app. Check here: https://developer.apple.com/ios/manage/distribution/index.action
From apple: To successfully build your application in Xcode for in-house distribution, you will need to create and download an Enterprise Distribution Provisioning Profile. These are different than the Development Provisioning Profiles that were used earlier in that Apple will only recognize applications as being ready for distribution if they contain this Distribution Provisioning Profile.
You are a member of the iOS Developer Enterprise Program aren't you?