16

I haven't used XCode since the first 6.x beta last summer. Today I installed the newest iOS beta on my iPhone 6 and the newest XCode beta from the developer portal. I created a new single-page swift application with an 8.3 target, and then tried to launch it on my device, but XCode shows it as ineligible in the build menu.

ineligible device

Any help on fixing this issue would be appreciated.

Connor Hicks
  • 755
  • 2
  • 8
  • 25

7 Answers7

109

In my case, selecting the device from Product --> Destination worked great.

starball
  • 20,030
  • 7
  • 43
  • 238
Pavel Smejkal
  • 3,600
  • 6
  • 27
  • 45
8

The fix is: Go to Product > Destination, and even though it says your device is ineligible, it will still allow you to select it, then building to it will work.

kalpeshdeo
  • 1,236
  • 1
  • 11
  • 16
7

You may need to login to the Apple Developer center and agree to the new terms of service. After that, do the following to update the provisioning profiles:

  1. Open Xcode
  2. Open Preferences...
  3. Select the Accounts tab
  4. Select your Apple ID
  5. Select View Details...
  6. Hit the refresh button in the bottom left corner

If you get an error about agreeing to the terms of service just wait a few minutes and try to refresh the provisioning profiles again.

Edit: For those still having trouble with ineligible devices, here's something else to try:

  1. Open Xcode
  2. Open Window
  3. Select Devices
  4. Control-click your device on the left side of the window and select Show Provisioning Profiles...
  5. Use - to remove all profiles (Xcode will install the necessary profile on the device when you launch the app). I had a bunch of old/extra profiles on my device.
  6. Double-check all settings in the Code Signing section in the build settings for your project and targets. Unfortunately I can't be more specific here but use your best judgement.
joat
  • 71
  • 4
6

If you haven't done this since last summer, you probably need a complete new set of credentials. (This is because the entitlements for running a Swift app on a device changed.) Clear out everything and start from the bottom up with a new developer identity. Then create the development profile. Finally, attach the device and make sure to tap Trust and wait for the symbols to be copied over. You will then probably need to detach the device and attach it again, but at that point if you attempt to build and run on the device it should work.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Well I JUST renewed my developer account this morning. When I connected the device, I clicked `trust` and it did generate new symbols. How would I go about deleting all the pre-existing certs? – Connor Hicks Feb 26 '15 at 20:00
  • 1
    As I describe here: http://stackoverflow.com/a/27736606/341994 Basically you quit Xcode and then delete everything by hand (mobile provisions on disk, certifications in the keychain). Then you go to the Member center and delete everything. Now you start the whole process over from scratch. – matt Feb 26 '15 at 20:02
  • I hope it does! I'm just guessing of course, but it's an educated guess because there came a day when Swift stopped working for everyone and we all had to do this. I'm assuming that what you're encountering is a variety of the same issue. – matt Feb 26 '15 at 20:12
  • It seems that didn't work :/ I generated a new cert manually and uploaded it to member centre and it still shows up as ineligible. Is there an xcode device provisioner that I'm missing? The 'devices' window is less than helpful. – Connor Hicks Feb 26 '15 at 20:20
  • 29
    YES! I used the `product->destination` menu to force it to build for the device, and it then prompted to repair the certs and it works now. Thanks for your help @matt – Connor Hicks Feb 26 '15 at 20:25
  • I'll add that to my answer - I assumed you knew that, sorry. – matt Feb 26 '15 at 21:50
  • 1
    @Connor Hicks´ should be the valid answer. – eharo2 Apr 12 '15 at 02:26
  • Whilst this issue persists, @Connor-Hicks solution: Product->Destination->TheDevice can be done via keyboard with the shortcut for Product->Destination->Select Next Destination **⌃⌥⌘]** or Select Previous Destination **⌃⌥⌘[** Faster and less frustrating – mysticcoder Apr 13 '15 at 22:55
  • Menu: product->destination -force building for the device, worked for me as well! Thanks @Connor Hicks – Karthi Apr 14 '15 at 06:46
  • @Connor Hicks´ product→ destination worked for me too. – Teofilo Israel Vizcaino Rodrig Apr 20 '15 at 13:34
0

According to the changelog, Apple has fixed this in XCode 6.3.1 If this issue still bugs you, you might wanna upgrade your environment.

Vaiden
  • 15,728
  • 7
  • 61
  • 91
-1

Edited:: 2015/Apr/27 Updated xcode version to 6.3.1 The problem was solved.

May be the update is required.

SHS
  • 1,414
  • 4
  • 26
  • 43
-1

Had this problem upon upgrading to the production version of Xcode 6.3. I tried all of the other solutions that were mentioned, and wasted hours trying various other things, but none of it worked. What did work was the nuclear option:

  • Uninstall Xcode

  • rm -rf "~/Library/MobileDevice/Provisioning Profiles/"

  • rm -rf "~/Library/Caches/com.apple.dt.Xcode/"

  • rm -rf "~/Library/Application Support/Xcode/"

  • rm -rf "~/Library/Developer/

  • Go revoke and delete your certificates and provisioning profiles in the iOS Developer Portal, then do the same in your Mac's key chain.

  • Install Xcode

  • Open Xcode, go to Preferences, add or select your iOS dev account, then refresh it to get new certificates and such (answer yes when prompted). Seems like you might also want to refresh it once again in some cases.

  • Update your project to point to those new credentials, where applicable

Wookie
  • 782
  • 8
  • 12