Add device to auto-generated Xcode 5 provisioning profile - xcode

I have created a simple project with XCode 5.
When I have created the project, XCode automatically generate the provisioning profile for my app. (I see it on my provisioning portal).
But now I added and removed some devices from my device list.
Is there a way to add a devices to provisioning profile generated by Xcode 5.
Thanks

This is what worked for me:
Go to Apple development portal and add the device (UDID) as you normally do. Till now the UDID is not added to your provisioning profile.
In Xcode, go to project settings and select Add an Account from the Team dropdown.
A dialog will pop up. Just press Cancel. (if xCode automatically generated Profiles that means you'd already have the account setup. You don't need to add a new account)
Now from left side, select the Apple account this project belongs to.
Click View Details
Now just click the refresh button at the bottom left side of the window.
It will take some time to refresh, but when it finishes, the UDID will be added to your X-Code generated Provisioning Profile.

Right click on the on your device and select "Add Device to Member Center". That will add your device to your provisioning portal.
Per XCode 5, provisioning profiles are managed by XCode 5. You see this in your Developer account.
If you wish to develop, you should create a new profile by clicking [+] on the top right and selecting "iOS App Development". You can then select which device you would like to add to this profile. Later on, you can add additional devices.
Apparently from Xcode, profiles that are managed by Xcode can not be altered.

I deleted the provisioning profile from iOS Provisioning Profiles on developer.apple.com and then xCode automagically regenerated it with the new devices added.
Took a few "update please" in Preferences->Accounts->Provisioning Profiles in xCode before the change happened.

Related

Xcode 7 no longer has a profile refresh button - so how to add new device ids to a profile?

I've just added a new device to the provisioning portal. Previously the next step would then be to manually update the relevant profiles to add this new device, however it seems this is now handled automatically by Xcode and its no longer possible to edit the profiles via the provisioning portal to include the new device. (There is no longer an edit button in the portal).
Ok, however the latest version of Xcode (Xcode 7 GM Seed) no longer has a refresh button to update the profiles so how are you now supposed to refresh/update profiles when a new device gets added to include that new device in the profile?
Xcode 6 had a circular arrow refresh profiles button, with Xcode 7 this has been replaced with a download profiles button. However this download button doesn't do anything in terms of updating the profiles. I tested this by:
a) Examining the profiles in the portal. They say there are N devices enabled by the profile.
b) Add a new device id to the portal. The profiles still say they enable N devices.
c) From within Xcode 7 click the download profiles button.
d) The profiles in the portal still say there are N devices enabled.
e) From within Xcode 6.4, click the refresh profiles button. It spins and does something.
f) Now the profiles say there are N + 1 devices enabled.
So until some other workaround is found, or there's a new feature in Xcode 7 that isn't common knowledge tribal knowledge yet, or its a bug in Xcode 7 and apple fix it, at the moment the only known way to update any changes to profiles is to switch back to Xcode 6.4 and refresh them from there.
however it seems this is now handled automatically by Xcode and its no longer possible to edit the profiles via the provisioning portal to include the new device
Your premise is false: there is an edit button in the portal for provisioning profiles, if this is a profile that you (not Xcode) created:
So, as you can see, for an ad hoc profile, you can edit and add the device manually.
If all you're trying to do is run on a device directly from Xcode, just run! If there's a problem, Xcode will regenerate the wildcard development profile for you automatically.

Provisioning Profile, Certificate is not listing in xcode 6.2

When I click on Code Signing Identity or Provisioning Profile, It gives me popup that says to enter value..
Check above Image, How to solve this???
Is it bug in xcode 6.2?
Bellow is account which has provisioning profile...
I have tried following things..
2 time restared mac
3 time restared xcode
tried on xcode 6.2 and 5.1
EDIT
I have tried Following all things.
Refreshing Account
Removed Account from Preference, Restart Xcode, Add Account again
Removed All Certificates, Provisioning profile from Keychain Access, Removed Account from xcode, Removed All Certificates from portal. Recreated Certificates and Provisioning profile, Downloaded it again
Removed All Certificates, Provisioning profile from Keychain Access, Removed Account from xcode, Removed All Certificates from portal. Recreated Certificates and Provisioning profile, Downloaded it again
I have Team Member Developer Account..
If I am missing anything to add here let me know..
Adding your Profile by typing "iPhone Developer" does not make sense.
Do the following steps:
go to the Apple Member Center and download all certificates and provisioning profiles
save them somewhere you can access theme like on desktop
double-click all of them, certificates and profiles
this will bring up Xcode and the Keychain
close Keychain as you won't need it anymore
in Xcode, go to Build Settings to verify the profiles were added correctly
set the Developer Code Signing Identity to your profile
Everything should work now.
Hope that helps :)
You must open the provisioning profile with xCode to be able to see it in the menu. Also, be sure that your Developer certificate's are in your keychain. If nothing else, try revoking them in your portal and recreate them.
Follow these steps :-
Xcode -> Preferences -> Accounts -> click on your Apple ID -> Click View Details -> click on your projects Provisioning Profile -> click the refresh button bottom left.

Removing provisional profile with ios 8 and Xcode 6.0.1

I cannot seem to remove the provisional profiles on my device using iOS 8 General settings since the profile selection is gone. Xcode 6.0.1 also does not allow for removing provisional profiles. Anyone know how to remove provisional profiles on a device running iOS 8 and Xcode 6.0.1?
It´s a little bit hidden in Xcode 6:
Open Xcode and go to Window --> Devices via the menu bar
On the left pane right click on your device
Choose option "Show Provisioning Profiles ..."
Delete the installed Provisioning Profile via the "-" button
That´s it.
In Xcode:
Window menu —> Devices
Choose the desired device from left panel
On the bottom of the left pane there is a settings icon. Use it to select show provisioning profiles
In the list of all the provisioning profiles installed on your device(s), add or delete it.

A valid provisioning profile matching the application's identifier could not be found

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

Xcode Product -> Archive disabled

I have been archiving for ad hoc distribution fine for many months and suddenly today I cannot do so as the Archive menu item is disabled. I have not changed anything. I went through the provisioning setup for the project and it looks ok.
My Ad Hoc profile is about to expire in 14 days. Could this be the problem? I don't believe I can renew it until the day it expires. There is a a "renew" button for my ad hoc profile in the organizer but when I click it I get...
The given profile was not found on the provisioning portal.
Please refresh your provisioning profiles before attempting to renew “MyAddHocProfile”
The profile in the provisioning portal shows active, expiring on the 30th. I noticed that I had not yet upgraded to 4.6.2 and did so. Then I downloaded my profile and double cliked it thinking that would refresh the profile in Xcode, still no joy. I also tried manually replacing the profile file MyAddHocProfile.mobileprovision in the Library.
What do they mean "refresh your provisioning profile"?
Even so, I would think that as long as the profile is active, I should be able to create an archive. I must be doing something else wrong.
You've changed your scheme destination to a simulator instead of Generic iOS Device.
That's why it is greyed out.
Select "Any iOS Device" in newer versions of Xcode. And Archive Option will be enabled!
Change the active scheme Device from Simulator to Generic iOS Device
Select active scheme to Generic iOs Device.
In addition to the generic device (or "Any iOS Device" in newer versions of Xcode) mentioned in the other answers, it is possible that the "Archive" action is not selected for the current target in the scheme.
To view and edit at the current scheme, select Product > Schemes > Edit Scheme... (Cmd+<), then make sure that the "Archive" action is checked in the line corresponding to the desired target.
In the image below, Archive is not checked and the Archive action is greyed out in the Product menu. Checking the indicated checkbox fixed the issue for me.
If you are sure that you selected the Generic iOS device and still can't see the option, then you simply have to restart Xcode.
This was the missing solution for me as a cordova developer with Xcode 11.2
Organiser was empty after try every here recommended settings, also it was impossible to do 'Product > Archive' but... Only when device connected on cable and app run then 'Archive' show up. and then was possible to do 'Archive' and app shows up in Organiser

Resources