27

I'm new to iOS Development and may very well have missed something relevant.

I have an app developed in Xcode and tested with development devices so that I know that it's working properly.

I have created the record in iTunes Connect and gone through the steps to enable status 'Waiting for Upload'

In Build Settings I set the provisioning profile I created for the app and the Code Signing Identity connected to that provisioning profile.

When I go to Organizer -> Archives to Upload the app everything seems to be working, I've tried both Validate and Distribute but I get the same XCode error every time.

Here's the beginning of the Error Message I get from XCode, let me know if there's needed more information.

Process:         Xcode [1920]
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:      com.apple.dt.Xcode
Version:         5.0 (3332.25)
Build Info:      IDEApplication-3332025000000000~2
App Item ID:     497799835
App External ID: 38302662
Code Type:       X86-64 (Native)
Parent Process:  launchd [129]
User ID:         501

Date/Time:       2013-09-20 11:37:11.767 +0200
OS Version:      Mac OS X 10.8.5 (12F37)
Report Version:  10

Interval Since Last Report:          8761 sec
Crashes Since Last Report:           8
Per-App Interval Since Last Report:  5941 sec
Per-App Crashes Since Last Report:   8
Anonymous UUID:                      B3570A30-11F9-5E70-9890-7B380C40FAE3

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT

Application Specific Information:
objc_msgSend() selector name: respondsToSelector:
ProductBuildVersion: 5A1413

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x00007fff91d39510 objc_msgSend_vtable5 + 16
1   com.apple.AppKit                0x00007fff8c52c3b2 +[NSTextInputContext currentInputContext] + 128
2   com.apple.AppKit                0x00007fff8c52bb81 -[NSApplication updateWindows] + 94
3   com.apple.AppKit                0x00007fff8c776d9f __38-[NSApplication setWindowsNeedUpdate:]_block_invoke_02349 + 76
4   com.apple.CoreFoundation        0x00007fff92a2f417 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
5   com.apple.CoreFoundation        0x00007fff92a2f381 __CFRunLoopDoObservers + 369
6   com.apple.CoreFoundation        0x00007fff92a0a7b8 __CFRunLoopRun + 728
7   com.apple.CoreFoundation        0x00007fff92a0a0e2 CFRunLoopRunSpecific + 290
8   com.apple.HIToolbox             0x00007fff9120ceb4 RunCurrentEventLoopInMode + 209
9   com.apple.HIToolbox             0x00007fff9120cb94 ReceiveNextEventCommon + 166
10  com.apple.HIToolbox             0x00007fff9120cae3 BlockUntilNextEventMatchingListInMode + 62
11  com.apple.AppKit                0x00007fff8c52a533 _DPSNextEvent + 685
12  com.apple.AppKit                0x00007fff8c529df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
13  com.apple.AppKit                0x00007fff8c5211a3 -[NSApplication run] + 517
14  com.apple.AppKit                0x00007fff8c4c5bd6 NSApplicationMain + 869
15  libdyld.dylib                   0x00007fff8edcb7e1 start + 1
Jens Åström
  • 293
  • 1
  • 3
  • 6

5 Answers5

63

I, too, got this error and crash in XCode 5 when submitting my archive from the organizer, while in Xcode 4.6, I had no issues just weeks before. It seems the real issue is that XCode is unable to find a matching signing identity; somehow the previously-created provisioning profile is not compatible or is not recognized.

Like mentioned by Manthan, creating a new provisioning profile resolves this problem. Here are the steps to do this:

  1. Log into https://developer.apple.com/membercenter/index.action
  2. In Certificates, Identifiers & Profiles, select Provisioning Profiles.
  3. Optional: select the old profile and then click the delete button.
  4. Click the Add button (+) in the upper-right corner.
  5. Select App Store as the distribution method; click Continue.
  6. Choose your App ID; Continue
  7. Choose your Certificate. NOTE: Make sure you select a certificate for which you have the private key (see Applications/Utilities/KeyChain Access, keychain: login, category: my certificates. Your certificate must be listed here with a private key in the sub list, otherwise you will need to obtain a new certificate.)
  8. Enter a name, and Done.
  9. In XCode Preferences (Cmd+,) select the Accounts tab, and then click View Details...
  10. Click the refresh button in the bottom left.

Now the new profile should appear (and the old one will disappear if you deleted it in step 3).

Finally, set the build settings and perform another archive.

  1. In XCode Project Navigator, select the project target and then Build Settings
  2. Enter "code sign" in the search filter
  3. Set the Provisioning Profile for Release to the new profile (as loaded in step 10).
  4. Set the Code Signing Identity for Release to the certificate from step 7 (or automatic should be okay)
  5. Product menu->Archive

At this point, I was able to validate and submit to app store. Hope it works for you too.

rodamn
  • 2,191
  • 19
  • 24
  • 1
    I find since XCode 4 you can stop using Build Settings to set provisioning profiles. Use Xcode > Accounts and then when you sign your app in organizer they get picked from a list. See ans above for screen shot. – brian.clear Sep 24 '13 at 16:23
  • Thanks. I think Apple purposely breaks this step with every XCode update so they get less App submissions;) – buster Oct 01 '13 at 20:42
  • this basically worked for me too (xcode 5.0). i did something a tad different: edit the Project settings as well as Targets in project setting. I left the Code Signing Identities for Debug+Release as Automatic (I believe it picks the identity from the Provisioning Profile, so keep things simple). – Jacob Mouka Oct 18 '13 at 17:03
  • This issue still exists in XCode 6.3. I followed the steps suggested by rodamn, but no luck. What worked for me was to not upload using XCode, but instead use the ApplicationLoader application. Hope that helps others stuck/frustrated with this one. – Joel Jun 17 '15 at 17:13
10

Try refreshing Certs/Provisioning Profiles in the new XCode 5 Accounts

XCode > menu > Preferences > Accounts
Click on your Developer Account from list on the Left
View Details button on right
Pop down screen appears
Hit tiny refresh button on bottom left.


If it says NO SIGNING CERT FOUND then 

1. if this is your first deploy to App Store then you need a cert.
2. If youve done it before did you choose the right account from the list.
Should have ADMIN status

The Top table should have VALID in second column

In bottom table sort by Expiration.

Scroll up and down as sorting doesnt move to top or bottom of table.

Make sure your Distribution cert hasnt expired.

If so you need to renew it in developer.apple.com

I find its safer do everything anything cert or prov profile related through this new accounts screen. If you change it on developer.apple.com. Dont download it. Just go to XCode accounts and hit refresh. things like Organizer > Validate > Distribute behave themselves then.

XCode account showing all certs as VALID and Expiration date in the future

enter image description here


Someone mention setting the Prov profiles in Build Settings.

Dont think this is needed anymore after XCode 5.

Here's screen shot of my Build settings.

If you add the right iTunes Developer account in XCode > Accounts.

When you Archive > Validate its there that you get a list of Distribution PPs to sign you app with. So setting them in Build Settings not needed.

enter image description here

enter image description here

brian.clear
  • 5,277
  • 2
  • 41
  • 62
5

You need to create New Provisioning profile for distribution to fix it.

Hope it works fine for you.

Manthan
  • 3,856
  • 1
  • 27
  • 58
  • I'm having the exact same problem, but I'm not sure of how to solve it. How do I go about creating a new provisioning profile? The online site keeps hanging on "loading" when I try to create a new one, and I'm not sure how exactly to do it in xcode. @Manthan – Malfunction Sep 20 '13 at 12:12
  • Create your new provisioning profile for distribution from apple's developer side. download that profile and add to your organizer window. It will work fine. – Manthan Sep 20 '13 at 12:14
  • That's exactly the problem: the page at apple's developer side keeps hanging on "loading" when I try to create one. @Manthan – Malfunction Sep 20 '13 at 12:15
  • You hit the spot with that solution for me – Jens Åström Sep 30 '13 at 08:26
2

The answer suggested by Manthan worked for me validating & submitting my app to the AppStore. Everything seemed properly set-up in member centre but still the app failed with notification "No identities are available for signing" even tough I had the private key for my certificate and the provisioning profile set up correctly.

No identities are available for signing

I ended up revoking my certificates (distribution and developer), cleaning my provisioning profiles and still I got the same error. I just created an exact same distribution provisioning profile, removed the old one from "Library/MobileDevice/Provisioning Profiles" by hand to be sure and I could build, validate and submit just fine!!

Wim Fikkert
  • 106
  • 5
0

As a (hopefully) useful aside, I've successfully used the Application Loader directly in some situations where XCode was just having a bad day.

Michael
  • 1,213
  • 6
  • 9