XCode 5 在 AppStore 验证中崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18913964/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XCode 5 Crashes on AppStore Validation
提问by Jens ?str?m
I'm new to iOS Development and may very well have missed something relevant.
我是 iOS 开发的新手,很可能错过了一些相关的东西。
I have an app developed in Xcode and tested with development devices so that I know that it's working properly.
我有一个在 Xcode 中开发的应用程序并使用开发设备进行了测试,因此我知道它可以正常工作。
I have created the record in iTunes Connect and gone through the steps to enable status 'Waiting for Upload'
我已经在 iTunes Connect 中创建了记录并完成了启用状态“等待上传”的步骤
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.
当我转到 Organizer -> Archives to Upload the app 时,一切似乎都在工作,我尝试了 Validate 和 Distribute,但每次都遇到相同的 XCode 错误。
Here's the beginning of the Error Message I get from XCode, let me know if there's needed more information.
这是我从 XCode 收到的错误消息的开头,如果需要更多信息,请告诉我。
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
回答by rodamn
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.
当我从组织者提交我的档案时,我也遇到了这个错误并在 XCode 5 中崩溃,而在 Xcode 4.6 中,几周前我没有问题。似乎真正的问题是 XCode 无法找到匹配的签名身份;不知何故,先前创建的配置文件不兼容或无法识别。
Like mentioned by Manthan, creating a new provisioning profile resolves this problem. Here are the steps to do this:
就像 Manthan 提到的,创建一个新的配置文件可以解决这个问题。以下是执行此操作的步骤:
- Log into https://developer.apple.com/membercenter/index.action
- In Certificates, Identifiers & Profiles, select Provisioning Profiles.
- Optional: select the old profile and then click the delete button.
- Click the Addbutton (+) in the upper-right corner.
- Select App Storeas the distribution method; click Continue.
- Choose your App ID; Continue
- 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.)
- Enter a name, and Done.
- In XCode Preferences (Cmd+,) select the Accountstab, and then click View Details...
- Click the refreshbutton in the bottom left.
- 登录https://developer.apple.com/membercenter/index.action
- 在Certificates, Identifiers & Profiles 中,选择Provisioning Profiles。
- 可选:选择旧配置文件,然后单击删除按钮。
- 单击右上角的添加按钮 (+)。
- 选择App Store作为分发方式;单击继续。
- 选择您的应用程序 ID;继续
- 选择您的证书。注意:请确保您选择了一个拥有私钥的证书(请参阅Applications/Utilities/KeyChain Access, keychain: login, category: my certificates。您的证书必须与子列表中的私钥一起列在此处,否则您将需要获得新的证书。)
- 输入名称,然后完成。
- 在 XCode Preferences (Cmd+,) 中选择Accounts选项卡,然后单击View Details...
- 点击左下角的刷新按钮。
Now the new profile should appear (and the old one will disappear if you deleted it in step 3).
现在应该会出现新的配置文件(如果您在第 3 步中将其删除,旧的配置文件将会消失)。
Finally, set the build settings and perform another archive.
最后,设置构建设置并执行另一个存档。
- In XCode Project Navigator, select the project target and then Build Settings
- Enter "code sign" in the search filter
- Set the Provisioning Profilefor Releaseto the new profile (as loaded in step 10).
- Set the Code Signing Identityfor Releaseto the certificate from step 7 (or automatic should be okay)
- Product menu->Archive
- 在 XCode Project Navigator 中,选择项目目标,然后选择Build Settings
- 在搜索过滤器中输入“代码符号”
- 将用于发布的配置文件设置为新的配置文件(如步骤 10 中加载的那样)。
- 将用于发布的代码签名标识设置为步骤 7 中的证书(或自动应该没问题)
- 产品菜单->存档
At this point, I was able to validate and submit to app store. Hope it works for you too.
在这一点上,我能够验证并提交到应用商店。希望它也适用于你。
回答by brian.clear
Try refreshing Certs/Provisioning Profiles in the new XCode 5 Accounts
尝试在新的 XCode 5 帐户中刷新证书/配置文件
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
Top 表的第二列应该有 VALID
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
如果是这样,您需要在 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.
我发现通过这个新帐户屏幕做任何与证书或证明资料相关的事情都更安全。如果您在 developer.apple.com 上更改它。不要下载它。只需转到 XCode 帐户并点击刷新即可。诸如 Organizer > Validate > Distribute 之类的事情就会表现得很好。
Someone mention setting the Prov profiles in Build Settings.
有人提到在构建设置中设置 Prov 配置文件。
Dont think this is needed anymore after XCode 5.
不要认为在 XCode 5 之后就不再需要了。
Here's screen shot of my Build settings.
这是我的构建设置的屏幕截图。
If you add the right iTunes Developer account in XCode > Accounts.
如果您在 XCode > 帐户中添加了正确的 iTunes 开发者帐户。
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.
当您存档 > 验证它时,您将获得分发 PP 列表以用于签署您的应用程序。因此不需要在构建设置中设置它们。
回答by Manthan
You need to create New Provisioning profile for distribution to fix it.
您需要为分发创建新的供应配置文件以修复它。
Hope it works fine for you.
希望它对你有用。
回答by Wim Fikkert
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.
Manthan 建议的答案对我验证并将我的应用程序提交到 AppStore 有用。一切似乎都在会员中心正确设置,但应用程序仍然失败并显示“没有身份可用于签名”的通知,即使我拥有证书的私钥,并且配置文件设置正确。
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!!
我最终撤销了我的证书(发行版和开发者),清理了我的配置文件,但我仍然遇到了同样的错误。我刚刚创建了一个完全相同的分发配置文件,手动从“库/移动设备/配置文件”中删除了旧的,以确保我可以构建、验证和提交!
回答by Michael
As a (hopefully) useful aside, I've successfully used the Application Loader directly in some situations where XCode was just having a bad day.
除了(希望)有用之外,我已经成功地在某些情况下直接使用了应用程序加载器,而这些情况下 XCode 只是度过了糟糕的一天。