ios 尝试使用 iPad 进行开发时发生未知错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12484817/
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
An unknown error occurred when I was trying to use an iPad for development
提问by Sepehrom
I was trying to test my app on a new iPad to see if Retina support is working.
我试图在新 iPad 上测试我的应用程序,看看 Retina 支持是否有效。
Like anyother devices I used for development, I attached the device and pressed "Use For Development" is XCode Organizer.
像我用于开发的任何其他设备一样,我连接了设备并按下“用于开发”是 XCode Organizer。
The process started but a few seconds later the progress bar went away and I received this error message : " An Unknown Error Occurred "
该过程开始,但几秒钟后进度条消失,我收到此错误消息:“发生未知错误”
I registered its UDID in devices section manually and the provisioning profile is successfully installed on the device but there still is a yellow dot in front of iPad's name in organizer and the device is not appearing in the iOS Devices list ( so that I cannot run my app on it ).
我在设备部分手动注册了它的 UDID,并且配置文件已成功安装在设备上,但管理器中 iPad 名称前面仍然有一个黄点,并且该设备没有出现在 iOS 设备列表中(因此我无法运行我的应用程序就可以了)。
I tried anything came to my mind but nothing worked out :(
我尝试了任何想到的东西,但没有任何效果:(
Any ideas ?
有任何想法吗 ?
Additional Info :
附加信息 :
- XCode version : 4.4.1
- iOS SDK version : 5.1
- Minimum Deployment Target : 5.0
- Device iOS Version : 5.1.1 (9B206)
- Device type : 3rd Gen New iPad ( Wifi + 4G )
- Intel Based Mac : Mac Pro With 2 x 2.26 GHz Quad-Core Intel Xeon
- OS Version : OS X Mountain Lion 10.8 (12A269)
- XCode 版本:4.4.1
- iOS SDK 版本:5.1
- 最低部署目标:5.0
- 设备 iOS 版本:5.1.1 (9B206)
- 设备类型:第三代新 iPad(Wifi + 4G)
- 基于 Intel 的 Mac:配备 2 x 2.26 GHz 四核 Intel Xeon 的 Mac Pro
- 操作系统版本:OS X Mountain Lion 10.8 (12A269)
回答by nicolasthenoz
Try disconnecting / reconnecting the iPad, quit and restart XCode, ... Sometimes it just won't work and restarting everything solves it !
尝试断开/重新连接 iPad,退出并重新启动 XCode,......有时它不起作用,重新启动一切即可解决!
回答by Can
This has happened to me a lot when I'm plugged in via the Apple USB keyboard (that has two USB ports underneath).
当我通过 Apple USB 键盘(下面有两个 USB 端口)插入时,这种情况经常发生在我身上。
If you plug in more than one thing in that keyboard, like two iPhones, it won't be able to deliver enough power to both, and you start getting intermittent disconnections.
如果您在该键盘上插入不止一个东西,比如两部 iPhone,它将无法为两者提供足够的电力,并且您会开始间歇性地断开连接。
Solution: Plug in directly to the Mac.
解决方案:直接插入Mac。
回答by darkheartfelt
One time this happened to me and it seemed my iCloud account on my device was not logged in. This was due to a password change I had done. Once I signed back in with the proper password the app seemed to build to the device just fine. :-)
有一次我遇到了这种情况,我的设备上的 iCloud 帐户似乎没有登录。这是由于我更改了密码。一旦我使用正确的密码重新登录,该应用程序似乎就可以很好地构建到设备上。:-)
回答by Apneist
In my case, after trying everything (restart of Ipad, XCode, imac), I found out the issue was being caused by the same app still running in the background of the Ipad from a previous run. I just had to dismiss the app from Ipad and all got fixed.
就我而言,在尝试了一切(重启 Ipad、XCode、imac)后,我发现问题是由上次运行时仍在 Ipad 后台运行的同一个应用程序引起的。我只需要从 Ipad 关闭该应用程序就可以解决所有问题。
回答by Taryn
Not a duplicate, but OS X, XCode, and IOS often fall on their swords because of code signing and caching fails, see if anything here helps: Error : failed to launch, when running on ipad
不是重复的,但是 OS X、XCode 和 IOS 经常因为代码签名和缓存失败而陷入困境,看看这里是否有帮助:错误:无法启动,在 ipad 上运行时
回答by David Wolever
I was able to fix this issue by changing the signing identity from one team to another, then back to the original team.
我能够通过将签名身份从一个团队更改为另一个团队,然后再回到原来的团队来解决这个问题。
回答by bronze man
You can use xcode->windows->devices and watch the device log to get more detail about "An unknown error occurred",you will get something like this:
您可以使用 xcode->windows->devices 并查看设备日志以获取有关“发生未知错误”的更多详细信息,您将得到如下信息:
- 0x16e12f000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: Failed to verify code signature of /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.L5Dvt0/extracted/Payload/Xxx.app/PlugIns/packetTunnel.appex : 0xe8008001 (An unknown error has occurred.)
- 0x16e12f000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: 无法验证 /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.L5Dvt0/extracted/Payload 的代码签名.app/PlugIns/packetTunnel.appex : 0xe8008001(发生未知错误。)
I have seen "An unknown error occurred" at follow conditions and fix it by correcting the code:
我在以下条件中看到了“发生未知错误”并通过更正代码来修复它:
- I write @interface with a class,and forget @implementation with that class name in an extension target.
- There is no code in one target of my project.
- 我用一个类编写@interface,并忘记了在扩展目标中使用该类名的@implementation。
- 我的项目的一个目标中没有代码。
回答by capikaw
Happened for me when iTunes was open in the background. Closing iTunes and Xcode, then re-opening Xcode worked for me.
当 iTunes 在后台打开时发生在我身上。关闭 iTunes 和 Xcode,然后重新打开 Xcode 对我有用。
回答by Brian Handy
I got this error when trying to install a 1GB app on a device with only 300MB left. I did not expect it to be an issue since the app was already installed on the device from iTunes, and I was just installing a local build to overwrite it, but I got this error repeatedly until I uninstalled the copy from the store. After that, it worked just fine.
尝试在仅剩 300MB 的设备上安装 1GB 应用程序时出现此错误。我没想到它会成为一个问题,因为该应用程序已经从 iTunes 安装在设备上,而我只是安装了一个本地版本来覆盖它,但是在我从商店卸载副本之前,我反复收到此错误。之后,它工作得很好。
回答by David Wadge
I could only get this to work by reconnecting the phone then following through with the iCloud welcome screens on my laptop.
我只能通过重新连接手机然后在我的笔记本电脑上使用 iCloud 欢迎屏幕来让它工作。