ios: How do I add a new UDID to provisioning profile without a tethered device? - ios

I know how to add from the web portal, but this particular provisioning profile is marked as "Managed by Xcode", therefore, I need to either stop managing from xcode or add a UDID into the profile from Xcode.
I cannot find any way to "stop managing" in Xcode.
In Xcode, I know how to add the device by tethering to my laptop and refreshing, but I don't see any option to add a UDID.

Here is what worked (multiple times now) ...
(Web) Login to Apple Developer > Member Center > iOS Provisioning > Add Devices
Add UDID with a meaningful name
Create a Provisioning Profile that includes all of your registered devices
(Xcode) Go back to the Organizer
Select the Provisioning Profiles section and select the specific profile
Check the box "Automatic Device Provisioning"
Press the Refresh button
Voila!

If you simply add the device's UDID to the developer portal, it will be automatically be added to ALL provisioning profiles. You can confirm this by downloading the profile and inspecting it (in plain text editor).

Go to: https://developer.apple.com/account/ios/profile/edit
Click All
Pick profile
Click edit
Select missing device
Click generate
Go to Xcode -> Preferences -> Accounts
Select your account and click View Details
Click Download All

Connect the phone to your mac and open XCode. Then click under Window->Organizer under Devices you must see your connected phone. There is an Button named "use for Development". Click this and after a few seconds the UDID must be in your team profile and you can install the app.
IMO you cant add devices to your team-provisioning-profile without connected to your mac, if this profile is managed by xcode. Alternative make an ad-hoc-provisioning-profile.
Hope that helps?

Related

How to add a device to provisioning profile automatically?

I want to allow my users to install my iOS app with ad-hoc distribution. I want to get their UDIDs and add them to the provisioning profile automatically. I know how to do it manually in the developer portal but what I need is an api to do this process automatically not manually.
Does apple provide any api or other means to add devices to provisioning profile automatically?
(Note that I do not have any device available. I just have their UDIDs)
Xcode will automatically add your devices into your provisioning profile. You will see a warning about that on xcode. You can click "Register" button on it.
Try the below steps
Login to your iphone provisioning portal through developer.apple.com
Add the UDID in devices
Go back to XCode, open up the Organizer and select "Provisioning Profiles", ensure that "Automatic Device Provisioning" is checked on the top right pane, then click on the "Refresh" button, and magically all your devices set in the provisioning portal will be automatically added.

Distributing to client via IPA with UDIDs?

A client is asking me to send an IPA file to them.
"You can send the file via email and it can be installed as a developer device"
I tested creating an IPA file for the project and archived it allowing XCode to automatically manage signing. This, as expected, only has my one device's UDID stored in the IPA.
I've gone into the apple developer portal and created an Ad-Hoc provisioning profile for this app. I am not seeing how to add in devices to the profile. When I go to edit the profile, the devices only show the option to select iPhone, Mac, or both.
I'm using Testflight, but the client also wants the IPA.
How can I correctly create an IPA file of my project with the provided device UDIDs?
Log into your apple account and go inside "Certificates, IDs and Profiles" section. There you'll see a section named "Devices", select the option "All" under it. Now you'll see + button top right corner, press it and add the udid of your client and name that device whatever you want and press continue.
Now open your xcode,
press the small i button in front of provisioning profile and drag and drop your provisioning profile (circled in black) anywhere on your desktop. Check the name of your provisioning profile and now go to Library / MobileDevice / ProvisioningProfiles. There you'll see all your provisioning profiles. Now just delete the one that has same name as the one that you just dropped on the desktop. After that Xcode will automatically generate the new provisioning profile for you with all the newly added udids inside it. Now you can archieve your project and generate the ipa file. It will now run on your client's device.
P.S. instead of doing all this you can also generate a new provisioning profile from your apple account and double click on it to insert it into xcode.

There is NO Use for Development in Xcode's Organizer window

I signed up with Apple's $99 development for iOS program today.
Under Certificates, Identifiers & Profiles in Xcode, no matter what I click on it tells me to:
Connect your device to your Mac and click Use for Development in Xcode's Organizer window. Sign in with the Apple ID associated with your iOS Developer Program membership and Xcode will automatically generate your certificates.
In Xcode 6.1, I go to Window then Organizer and I only see projects and Archives. No device next to it and no button to click "Use For Development" and I have my iPhone connected.
Funny thing is I already connected my iPhone app game to work on an iPhone device yet I still have no button to click on "Use For Development".
What am I missing? This is all I'm being told to do by Apple and I don't see the button.
Xcode 6.1 removed 'Devices' from 'Organizer'.
Now you can go to Window > Devices to get all the connected and registered devices.
What I find, although it's hard to get into a total zero state in order to test, is that if you just connect the device to the computer and try to build-and-run with the device as destination, Xcode puts up a dialog offering to help you and, if you accept, it does all the work: it registers the device at the member center and downloads the universal provisioning profile.
So there is no "Use For Development" button because there doesn't need to be one: it was superfluous.
automatic signing
Automatic signing is a target setting that allows Xcode to manage signing assets for you. The signing settings are located in the General pane under the heading Signing in the project editor. To enable automatic signing, select “Automatically manage signing.”
If you enable automatic signing, Xcode does the following for you when needed:
Creates your certificates and signing identities
Registers connected devices
Creates and edits App IDs
Manages provisioning profiles
Edits the entitlements and information property list files
If you choose manual signing, you’ll need to sign in to your developer account at developer.apple.com/account to perform some of these steps yourself.
Important: All targets in a bundle should use the same signing identity. If you select automatic signing for one target, you should select automatic signing for all targets in your project.
screenshot for more details
Automatic Signing:
As of XCode 9.3, there is no more dialog, as in Matt's answer. Instead, with your device connected, review your Build Target(s) page - under Signing, there is a "Register Device" button. Use that to have XCode automatically handle adding the new device and updating your provisioning profile.
Manual Signing:
If you're not allowing XCode to manage signing for you, or if you have multiple devices to register, then Manual Signing is the way to go. In Window > "Devices & Simulators" > Devices, look for the UDID (aka Identifier) for your connected device (40-character alphanumeric string). Copy that string, and keep it handy.
Log in to your Apple Developer Account, go to Certificates, Identifiers & Profiles > Devices. Click the "+" to add one (or multiple) devices, and paste in the device name and the UDID/Identifier you copied earlier.

Automatically refresh IOS devices in a team provisioning profile by Xcode

I have some IOS devices week by week to which I must send my apps for testing purposes during development. These devices can't be pluuged to my computer, because they are far away from me and just for this case they won't be taken to my local machine. If plugging would be available, my life would be much easier. But it is not the case.
Now I have to do a lot of annoying things by hand: add it, regenereate it, delete it from local machine, add to new one etc etc.
After adding a device to my devices in Apple developer portal I'd like to have it in XCode without regenerating certificate, delete, download to my local machine. There should be some automatic refresh process.
Before XCode 4.5 there was an option in organizer to refresh it automatically by Xcode.
What about in the current XCode version?
In Xcode 4.5 same option to refresh is available.
Steps To create Ad hoc Profile which is to be followed before the above process is done.
Check this.
Steps to refresh profile.
1.In developer portal Add device.
2.Update Developer provisioning profile by adding the device to the profile.
3.Open Xcode> Organiser >Devices
4.Delete the old profile
You will find a refresh button at the button click refresh.
Clean the project and Archive it.
Send it to user, It will work on the new Device.
#TechFanatic's solution didn't work for me.
What did work was for me was:
From XCode, select XCode > Preferences.
Click the "Accounts" tab.
Select your account.
Click the "View Details..." button.
Click the refresh button in the lower left corner.
This comes from the section "Refreshing Provisioning Profiles in Xcode" in Apple's documentation.
EDIT: This no longer works in XCode 7. There is no "refresh" button that I have found anywhere in XCode 7. If you find one, please provide that answer. In the meanwhile, there is a solution of sorts - you delete and recreate the managed profile.
Specifically, if you are doing an Ad Hoc build:
In the member center, delete the "iOS Team Provisioning Profile" for your app. Do not delete the "XC Ad Hoc" provisioning profile.
In XCode, in the XCode > Preferences menu, in the "Accounts" tab, under "View Details..." for your account, delete the "iOS Team Provisioning Profile" for your app by right-clicking and selecting "Move to Trash".
In the "General" tab for your Target, there will be a "Fix Issue" button. Click it.
Don't worry that the member center now says that your XC Ad Hoc provisioning profile is now invalid. That will fix itself in a later step.
Build your app.
Archive your app.
Export your app from the "Organizer".
Select "Save for Ad Hoc Deployment".
XCode will complain that your provisioning profile doesn't match or some such. Click the "Reset" button and then click "Try Again".
XCode should continue and create an .ipa file.
In the member center, your XC Ad Hoc provisioning profile will show up as active again.
Simple, right?

How to add a new device to a team provisioning profile

I have a new device for our app to be tested on, so I added it to the provisioning portal.
There are currently two development provisioning profiles - however the provisioning portal will not let me edit the team provisioning profile in order to add the new device.
- But I'm sure this something I've done before as I've previously added new devices as they arrived to enable testing with them.
How can I add the new device if the profile isn't editable? (
(The limit has not been reached, there's only several devices in the portal in total).
For Xcode 5 :
From the Xcode menu select preferences>>Accounts, Select your Apple ID then select Details...
You will get a popup with your Signing Identities and Provisioning Profiles.
Click the Refresh button in the bottom left and the iOS Team Provisioning Profiles get re-generated and downloaded.
You don't have to edit it, click Refresh in Xcode Organizer to make it generate a new one for you automatically.
For new XCode 5 & Xcode 6
Adding Device UDID to Provisioning Profile on developer.apple.com
Login to iOS dev center and go to Device section under 'Certificates, Identifiers & Profiles'
Add new Device using UDID
Update Provisioning profile with newly added Device
Once you have added the device and need to update your developer provision profile
Select newly added device in provisioning profile and click Generate
Update XCode with Updated Provisioning Profile
Finally goto XCode --> Preferences --> Accounts --> ViewDetails -->Refresh -->Done
That's All Go for Clean and Build now.
Cheers!!
On XCode 7 the answers here are inapplicable. https://stackoverflow.com/a/32725552/1449799 should work (delete the profiles in xcode, and tell it to download them again), BUT unlike the instructions at the link, for XCode Version 7.2.1 (7C1002), you (or at least I) cannot select multiple profiles at once.
Open the Organizer window in Xcode. With your device plugged in to the computer, select your device in the Organizer.
In the area detailing your device's specs, click the button titled "Use for Development". You may need to log in to your Apple Developer profile. Once that's done, your device should be listed as part of the provisioning profile and have the profile installed.

Resources