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.
Related
I am trying to publish an app for testing, without having to connect a device in my mac.
I have created a developer account, created an app in itunes, generated bundle id, signed into xcode with the developer account, generated a distributor certificate.
When I tried to archive the app, I got the error "conflict provisioning setting. app is automatically signed for development ..."
I read in this post and followed the tip of unchecking and rechecking the option "Automatically manage signing". After re-choosing my team, I get the error "There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it".
The goal all along was that I wouldn't need an ios device, because I intended to immediately publish the application and invite people to test it via testflight. Is it not possible to do it like this? Am I missing something.
I have read lots of documentation, but being a first timer in this, everything seems confusing.
Edit: I created a provisioning profile as distributor. Even after creating and installing the distributor profile (it now appears also in xcode at Account -> provisioning profiles), I still get that same error. I also noticed that in signing, The signing certificate is iOS Developer. I am sure
I fixed it by plugging in my iPhone and going to the Product menu > Destination > iPhone (my device).
Then after clicking Try Again on this properties page the warnings went away.
Source
The solution (though I would welcome more elaborate, insightful explanations):
#General -> Signing, disable the option "Automatically manage signing"
#General -> Signing and certificates choose your team
Though in my case that was not the issue, I would recommend making sure that in the device list, you choose Generic iOS device in your target devices.
This really sucked to figure out.
What you do is add a distribution profile in https://developer.apple.com/account/resources/profiles/add. Don't choose development! Don't let the Xcode Automatically manage signing!!
Then, you download the provision.
Then, in the Signing & Capabilities -> Signing Section of the project.xcodeproj file, turn off Automatcially manage signing, choose import and import the file you just downloaded.
Then, in the top, you choose Any iOS Device (arm64, armv7) and then you go Product -> Archive.
What happened to me was that I was about to run my app on a physical device for the first time and I didn't have a Team. So I created it in the process before connecting my phone with the USB cable. After I created the team a message like the listed above appeared. I did some research on internet but nothing found.
So here's what I did: I connected my phone, did all the trusted process, then restarted Xcode, and it worked. I am not sure what happened, but it was some of my first experiences using Xcode. It could sounds silly but it helped me. Hope to you too.
If you do not wish to register a device follow this advice:
https://stackoverflow.com/a/44157307/499581
* In short use "Generic" as the device while archiving.
If you do wish to register a device then the solution to:
"There are no devices registered in your account on the developer
website. Plug in and select a device to have Xcode register it".
Is to physically plug-in your device (an actual iPhone, or iPad) so that Xcode can register it for development use (note: this will not affect the normal everyday use of the device). After the device is registered it can then be used for development testing, load provisioning profiles onto it, etc.
↳ Disabling and Enabling Devices Using Your Developer Account
For those who are trying to develop without a mac computer using MacInCloud don't follow the standard advice out there. Its will lead you down a hole. I have wasted hours of my time.
The reason it say something about "a device to be registered to create provisioning profile" is that you need to provision an iOS device that you can test on before you can get it signed. If you are using MacInCloud you probably can't physically connect an iPhone or iPad to the MacInCloud and therefore it can't automatically provision devices for you.
Before you get to far into this you will need to get your iPhone/iPad UDID. Which I was able to do with https://get.udid.io/ on my iPhone, but it didn't work on my iPad. Instead, with the iPad I had to download iTunes from the Windows store and connect my iPad. Then click on the little gray square in the menu that's inline with Library tab.
image of itunes
Then when it pops up with your device info (mine didn't come up with my info at first, I had to sync my device). You will see your SN. Click on your SN and it will change to your UDID. Once you have your UDID you are ready to create a provisioning profile. What is confusing is this isn't done in the appstoreconnect section of your account online. Its done in your developer account: https://developer.apple.com/account
developer.apple.com account screen shot
When you go there you will want to click: Certificates, Ids & Profiles
Here you will need to add your devices and then with auto signing checked in Xcode that made the problem go away. NOTE: I originally tried to create a profile, download it, and import into Xcode under the Provisioning Profile dropdown in Signing & Capabilities. As described in another answer here, but that proved more problematic and wasn't necessary.
Then you can chose Any iOS Device from emulator device drop down then go to Product > Archive > Distribute App and create a certificate to place it on the app store (TestFlight).
you can also plug an iphone, run the app the app on your iphone as the target, it will ask you to register the device and then the certificates will be generated
Have you paid the $99/year developer fee? TestFlight is only available for paid developers. I would highly recommend plugging in an iOS device, though. It's more fun and rewarding testing that way.
I have my devices registered in my Apple developer account, I have an App ID and I created Provisioning profile that includes all my devices. Now when I try running the project on my iPhone, it gives me this error, "Valid provisioning profile not found for this executable." But when I try on other devices in the provisioning profile, it works!!
All other projects and provisioning profile show similar behaviour to this device. I have confirmed that my device is added and has not been DISABLED on my developer account. What can be the issue?
Thanks Ronit. This is the solution if your Provisioning profiles are working good to all its containing device but one of it is giving the issue described in the question.
Simply Back-up your device, and reset all settings from your iPhone
Goto iPhone's Settings App -> General -> Reset (Very bottom) -> Reset All Settings.
And later I tried running the App without any changes in my projects and certificates and it works...
Though I would like to highlight it for Apple Engineers... :P
In my case, I had an app with explicit app ID and got the same error when using the wildcard profiles, created by Xcode. I could fix it the following way:
Point Safari to https://developer.apple.com/account/ios/profile/ and create a development profile with all needed devices
Open Xcode's preferences > Accounts
Select your Apple ID and click on "View Details…"
"Download All"
(This downloads to ~/Library/MobileDevice/Provisioning Profiles)
After that I could use Xcode's Run command and get a running app on my device.
I want correctly understand the Code Signing Identity setting: I want to use the automatic setting in Xcode and not specify a specific identity. The automatic setting has 2 choices: iOS Developer and iOS Distribution. Based on which one you use, it's supposed to switch to choose a developer or a distribution signing identity from your keychain.
I have my build settings configured as follow, in order to use an "iOS Distribution" identity on build:
When I Archive my app (the Archive scheme is correctly set to use the Release build configuration), I see that Xcode is not using the correct code signing identity:
Anyone would know why this is the case? I'm looking for an explanation and not a workaround solution (I know I can work around the problem by directly setting the Code Signing Identity to my iPhone Distribution: Company Name identity from the keychain)
Thanks!
So interestingly this doesn't actually matter in the latest Xcode as long as the profile you are eventually going to sign with is for the same bundle identifier as the one its signing with now...
As long as the team setting is set Xcode is capable of generating the profile you need automatically. Don't try to fight it.
Here is the Team setting from the Target's General settings screen:
Then when you archive Xcode puts the archive in the organiser. When you click distribute on the archive in the organiser window it prompts you to select a new signing identity and actually re-signs the app.
It actually works to sign apps with the team provisioning profiles generated by Xcode. You also don't need to make an ad-hoc specific provisioning profile as your testers can now install apps signed using the development provisioning profiles with no issues. The only time you will need to make your own provisioning profile is if you are using any of the concrete bundle id features like push notifications, game centre, data protection, iCloud, inter-app audio, passbook, keychain access groups or in-app purchase.
If you make your own provisioning profiles for specific bundle ids then Xcode will either automatically select, or have available for selection, the relevant provisioning profile at the point of choosing the identity in the organiser window.
You can refresh Xcode's cache of provisioning profiles from the Accounts pane of Xcode's settings. Click on your team, Click "View Details" and then click the tiny refresh button in the bottom left corner
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?
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?