XCode 4.3 组织者崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9325804/
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 4.3 organizer crash
提问by Infinite Possibilities
I've installed the XCode 4.3. I've seen that in preferences general tab, there is the "iOS device discovery" tab. Maybe it was there before too, but I just noticed now. So I've checked it, after this I can do anything, but the XCode crashes constantly when I try to access the organizer's devices tab.
我已经安装了 XCode 4.3。我已经看到在首选项常规选项卡中,有“iOS 设备发现”选项卡。也许以前也有过,但我现在才注意到。所以我检查了它,在此之后我可以做任何事情,但是当我尝试访问组织者的设备选项卡时 XCode 不断崩溃。
Any clues for solution?
任何解决方案的线索?
Update: I've deleted it and reinstalled it from the Mac App Store, but it didn't help
更新:我已经删除它并从 Mac App Store 重新安装它,但它没有帮助
Update: I've submitted the bug to Apple, they marked it as duplicate and after this they closed both of them. So, I hope we will have a solution from Apple.
更新:我已将该错误提交给 Apple,他们将其标记为重复,此后他们关闭了这两个错误。所以,我希望我们能从苹果那里得到解决方案。
采纳答案by Ozone
Same Problem here. I just created a new user on my system. With it I have no problem open the Devices in the Organizer Window.... strange...
同样的问题在这里。我刚刚在我的系统上创建了一个新用户。有了它,我在管理器窗口中打开设备没有问题......奇怪......
Edit: I've deleted one certificate in my keychain that solve the problem for me. It was a certificate which was not trustful. Maybe this will help you.
编辑:我删除了钥匙串中的一个证书,为我解决了问题。这是一个不可信的证书。也许这会帮助你。
Note that the "harmful" certificate might not be a development certificate or related to development/provisioning at all. Make sure to check for "Certificates", not just "My certificates" in Keychain. The culprit could be any certificate, like a company-signed SSL certificate etc.
请注意,“有害”证书可能根本不是开发证书或与开发/供应相关。确保检查钥匙串中的“证书”,而不仅仅是“我的证书”。罪魁祸首可能是任何证书,例如公司签署的 SSL 证书等。
回答by Fls'Zen
I can't take full credit for this. I found it hereand added a little bit to the end that I needed in my case.
我不能完全相信这一点。我在这里找到了它,并在最后添加了一些我需要的东西。
Create readcert.m with these contents:
使用以下内容创建 readcert.m:
#import <Security/Security.h>
#import <Foundation/Foundation.h>
void checkCerts () {
OSStatus status;
const void *keys[] = {
kSecClass,
kSecReturnRef,
kSecMatchLimit
};
const void *values[] = {
kSecClassCertificate,
kCFBooleanTrue,
kSecMatchLimitAll
};
CFDictionaryRef query = CFDictionaryCreate(NULL, keys, values, 3, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
CFArrayRef results;
if ((status = SecItemCopyMatching((CFDictionaryRef) query, (CFTypeRef *)&results)) != noErr) {
NSLog(@"Failed to copy certificates: %d", status);
return;
}
CFIndex count = CFArrayGetCount(results);
CFIndex i;
for (i = 0; i < count; i++) {
SecCertificateRef cert = (SecCertificateRef) CFArrayGetValueAtIndex(results, i);
CFErrorRef error;
CFDictionaryRef vals = SecCertificateCopyValues(cert, NULL, &error);
if (vals == NULL) {
CFStringRef subjectSummary = SecCertificateCopySubjectSummary(cert);
NSLog(@"Found a triggering certificate: %@", subjectSummary);
}
}
CFRelease(results);
}
int main (int argc, char *argv[]) {
NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init];
checkCerts();
[p release];
return 0;
}
Then, compile it with:
然后,编译它:
clang -o readcert readcert.m -framework Security -framework Foundation
Then run it:
然后运行它:
./readcert
It should output the name of the bad certificate. In my case, it was a certificate from a Linksys router. I deleted the certificate from my keychain, but Xcode was still crashing and readcert was still saying it was there, so I ended up executing this command.
它应该输出错误证书的名称。就我而言,它是来自 Linksys 路由器的证书。我从我的钥匙串中删除了证书,但 Xcode 仍然崩溃并且 readcert 仍然说它在那里,所以我最终执行了这个命令。
sudo security delete-certificate -c Linksys_WRVS4400Nv2
I'm not sure where the certificate was coming from, I didn't see it in the login or system keychains, but after deleting it from the command line, everything was peachy again in Xcode.
我不确定证书的来源,我没有在登录名或系统钥匙串中看到它,但是在从命令行删除它后,Xcode 中的一切又恢复了正常。
回答by DoctorG
Same Problem. Not happy. I have a hard time believing apple released this in such a state. XCode has crashed at least 25x today on me.
同样的问题。不开心。我很难相信苹果在这种状态下发布了这个。XCode 今天在我身上至少崩溃了 25 倍。
回答by Peter Kevin Reeves
I solved the problem. I don't know if its the best solution, but after five days I'm happy to have Xcode working again.
我解决了这个问题。我不知道它是否是最好的解决方案,但五天后我很高兴让 Xcode 再次工作。
I solved the problem by doing two things. Resetting my Keychain under Lion and revoking my existing provisioning profiles.
我通过做两件事解决了这个问题。在 Lion 下重置我的钥匙串并撤销我现有的配置文件。
So first, reset your Keychain under Lion (http://support.apple.com/kb/TS1544). This will make the Organizer launch without crashing.
因此,首先,在 Lion (http://support.apple.com/kb/TS1544) 下重置您的钥匙串。这将使管理器启动而不会崩溃。
Unfortunately, now you can't deploy your software because you killed all the certs in the keychain. So now you need to revoke all your developer certs (developer.apple.com/membercenter) and delete the provisioning profiles from your Organizer. Then tell the Organizer to refresh.
不幸的是,现在您无法部署您的软件,因为您杀死了钥匙串中的所有证书。因此,现在您需要撤销所有开发者证书 (developer.apple.com/membercenter) 并从管理器中删除配置文件。然后告诉组织者刷新。
It will restore all your sick profiles, but will also create at least one healthy one.
它将恢复您所有生病的个人资料,但也会创建至少一个健康的个人资料。
The new version of Xcode tries to be helpful, and wants to handle all your cert needs for you. So bring up an Xcode project, and set code signing to the new provisioning profile. Compile, and everything will work again.
新版本的 Xcode 试图提供帮助,并希望为您处理所有证书需求。因此,启动一个 Xcode 项目,并将代码签名设置为新的配置文件。编译,一切都会重新开始。
As I said, may not be the best solution, but deleting old certs from the Keychain and extra prefs files did nothing to help me. If all else fails, try this recipe and it will probably help.
正如我所说,可能不是最好的解决方案,但从钥匙串和额外的偏好文件中删除旧证书对我没有任何帮助。如果一切都失败了,试试这个食谱,它可能会有所帮助。
回答by Casey
Finally figured this out. The problem for me was with the my dev device and not XCode. I restored my device to the factory defaults. Now XCode won't crash when the device is plugged in.
终于想通了这一点。我的问题是我的开发设备而不是 XCode。我将设备恢复为出厂默认设置。现在插入设备时 XCode 不会崩溃。
Before I reset the device, I tried just deleting all the certificates on the device. However, XCode still crashed. That's the only other step I took on the device before reseting it.
在重置设备之前,我尝试删除设备上的所有证书。但是,XCode 仍然崩溃。这是我在重置设备之前在设备上采取的唯一其他步骤。
3/22/12 UPDATE: Apple released a new version of XCode today. From the release notes:
2012 年 3 月 22 日更新:Apple 今天发布了新版本的 XCode。从发行说明:
Additional bug fixes and stability improvements
其他错误修复和稳定性改进
Hopefully this fixes the issue for most people.
希望这可以解决大多数人的问题。
4/11/12 UPDATE
2012 年 4 月 11 日更新
I started to have issues again with XCode. A colleague suggested I clear out the XCode cache for my project, which was located here for me:
我开始再次遇到 XCode 的问题。一位同事建议我清除我的项目的 XCode 缓存,该缓存位于此处:
~/Library/Developer/Xcode/DerivedData/your_app_name-abunchofletters
Within that folder run:
在该文件夹中运行:
rm -r *
XCode no longer crashes when plugging in my dev device.
插入我的开发设备时,XCode 不再崩溃。
回答by mmopy
I tried removing certificates as others have suggested and even reset my Keychain. However this had no affect and opening the organiser always causes a crash/hang.
我尝试按照其他人的建议删除证书,甚至重置我的钥匙串。然而,这没有影响,打开组织者总是会导致崩溃/挂起。
My fix was to remove some of the Xcode settings files. Specifically I removed the following:
我的解决方法是删除一些 Xcode 设置文件。具体来说,我删除了以下内容:
~/Library/Developer/Xcode/UserData/IDEOrganizerWindowController.xcuserstate
~/Library/Developer/Xcode/UserData/IDEPreferencesController.xcuserstate
~/Library/Developer/Xcode/UserData/KeyBindings
The solution to this Xcode problem seems to vary, but I had not seen anyone else post this solution, so I hope it will help others. Remember I had gone through the Keychain reset before getting to this, so I'm not ruling out a keychain reset with this solution.
这个 Xcode 问题的解决方案似乎各不相同,但我还没有看到其他人发布此解决方案,所以我希望它可以帮助其他人。请记住,在此之前我已经完成了钥匙串重置,因此我不排除使用此解决方案重置钥匙串的可能性。
回答by Scorpius
This isn't a real fix, but if you open up Activity Monitor, filter for bash, and continue to close/force close that process, xCode will regain consciousness.
这不是真正的修复,但如果您打开活动监视器,过滤 bash,并继续关闭/强制关闭该进程,xCode 将恢复意识。
回答by Rajan Maharjan
I deleted all old certificates which were not trustful. Even after doing so, my Xcode 4.5 crashed while opening organizer.
我删除了所有不可信的旧证书。即使这样做之后,我的 Xcode 4.5 在打开管理器时也崩溃了。
Hard Resetting the Xcode fixed my problem.
硬重置 Xcode 解决了我的问题。
Fire up your terminal.
Type "defaults delete com.apple.Xcode" and press "Enter." This deletes the customized settings set up.
Sometimes if you have more than one version of Xcode installed the defaults bundle identifier could be different. You can check lists of bundles identifiers by allowing terminal to show possibilites by pressing Tab button.
Type "rm -rf ~/Library/Application\ Support/Xcode" and press "Enter." This removes the configuration folders as well.
启动你的终端。
输入“defaults delete com.apple.Xcode”并按“Enter”。这将删除自定义设置。
有时,如果您安装了多个版本的 Xcode,则默认包标识符可能会有所不同。您可以通过按 Tab 按钮允许终端显示可能性来检查捆绑包标识符列表。
输入“rm -rf ~/Library/Application\ Support/Xcode”,然后按“Enter”。这也会删除配置文件夹。
Now open up an Xcode and it will show you agreement page. In this way my Xcode worked as expected.
现在打开一个 Xcode,它会显示你的协议页面。这样我的 Xcode 按预期工作。
I hope it might be help to someone.
我希望它可能对某人有所帮助。
回答by Puneet Bharti
If above solutions dosen't work then try installing previous version of your xcode using time machine. Really it worked for, apple updates is creating problem.
如果上述解决方案不起作用,请尝试使用时间机器安装以前版本的 xcode。真的有用,苹果更新正在产生问题。
回答by user8497627
I tried all the above and couldn't, the solution I found was really simple:
我尝试了以上所有方法但都不能,我找到的解决方案非常简单:
Go to ~/Library/Developer/
, inside this folder has a folder Xcode
, all I did was renaming the existent one and reopen Xcode
, then Xcode
created a new folder name Xcode
and everything started to work again.
转到~/Library/Developer/
,在此文件夹中有一个文件夹Xcode
,我所做的只是重命名现有文件夹并重新打开Xcode
,然后Xcode
创建一个新文件夹名称Xcode
,一切又开始工作。
Hope that helps.
希望有帮助。