xcode “存在内部 API 错误。” 在任何 iPhone/iPod touch 设备上运行应用程序时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3564392/
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
"There was an internal API error." while running an app on any iPhone/iPod-touch device
提问by Martin Cowie
I am in the process of submitting an iPhone app to the App Store. While making the final touches to the app I was in the process of compiling and running the app on my iPhone when I got this message:
我正在向 App Store 提交 iPhone 应用程序。在对应用程序进行最后润色时,当我收到此消息时,我正在 iPhone 上编译和运行该应用程序:
There was an internal API error.
出现内部 API 错误。
The console had this to say:
控制台有这样的说法:
25/08/2010 10:10:54 Xcode[3556] Failed willExecute: Error Domain=com.apple.platform.iphoneos Code=0 UserInfo=0x2011adec0 "There was an internal API error." -- {
NSLocalizedDescription = "There was an internal API error.";
NSLocalizedFailureReason = "";
NSLocalizedRecoverySuggestion = "";
}
The problem is specific to this project, others projects don't suffer the same problem. The same problem exhibits when moved to another machine, or another mobile device is swapped in.
该问题特定于该项目,其他项目不会遇到同样的问题。当移动到另一台机器或换入另一台移动设备时,会出现同样的问题。
I should be most grateful for any hints or ideas on the subject.
我应该非常感谢有关该主题的任何提示或想法。
采纳答案by Martin Cowie
Aha! Thank heavens for subversion. Through comparison with a working version I found out that an offending 'UIRequiredDeviceCapabilities' in my info.plist was at fault. A little figure digging showed it had to be an Array or Dictionary, and not a string as was my case. Setting it thusly ...
啊哈!感谢上天的颠覆。通过与工作版本的比较,我发现我的 info.plist 中的一个有问题的“UIRequiredDeviceCapabilities”有问题。一个小数字挖掘表明它必须是一个数组或字典,而不是像我这样的字符串。如此设置...
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>still-camera</string>
</array>
.. solved the problem.
..解决了这个问题。
@Toastor, this happened during the deployment process, even before the app went down the wire to the device.
@Toastor,这发生在部署过程中,甚至在应用程序连接到设备之前。
回答by Piotr Czy?
I had the same problem on Xcode 4.5 beta 4 when I've tried to run an app which was already installed on my iOS device. You could try to remove your app from device and make sure you are using Developer profile for signing.
当我尝试运行已安装在我的 iOS 设备上的应用程序时,我在 Xcode 4.5 beta 4 上遇到了同样的问题。您可以尝试从设备中删除您的应用,并确保您使用的是开发人员配置文件进行签名。
回答by henghonglee
my problem was using a distribution profile, forgot to change back to a developer profile and that was what caused the internal api error. hope it helps someone
我的问题是使用分发配置文件,忘记改回开发人员配置文件,这就是导致内部 api 错误的原因。希望它可以帮助某人
回答by alex
https://forums.developer.apple.com/thread/11634
https://forums.developer.apple.com/thread/11634
States that you need to change project name to an english name
说明您需要将项目名称更改为英文名称
回答by gleerman
I had the same issue. My case was an iPhone that was used for the first time on the laptop. I fixed it by opening the project in XCode with the iPhone plugged in. Xcode will then say "Processing symbol files". When finished, deploying on iPhone worked from within the QT Creator.
我遇到过同样的问题。我的案例是第一次在笔记本电脑上使用的 iPhone。我通过在插入 iPhone 的情况下在 XCode 中打开项目来修复它。然后 Xcode 会说“正在处理符号文件”。完成后,在 QT Creator 中部署在 iPhone 上。
回答by Jeff Grimes
I had the same problem, and it worked when I removed the app from my phone and Built and Run again. I'm guessing you might have tested a build from a different branch and then tried to switch back to yours.
我遇到了同样的问题,当我从手机中删除应用程序并再次构建并运行时它起作用了。我猜您可能已经测试了来自不同分支的构建,然后尝试切换回您的构建。
回答by hamid toosi
I deal with same problem, but because of manually deleting "Application/Myapp" folder. I copied back the files and uninstall it. Then I tried to run it using Xcode. Now every things is OK.
我处理同样的问题,但因为手动删除了“Application/Myapp”文件夹。我复制回文件并卸载它。然后我尝试使用 Xcode 运行它。现在一切正常。
回答by rotoava
1.Check your project's Info.plis document code (not table list--open as source code ).There may be configuration error.
1.检查你项目的Info.plis文档代码(不是表格列表--作为源代码打开)。可能存在配置错误。
2.I solve the problem by this way : Create a new project , Compare the Info.plis code, and fix the old one .
2.我是这样解决问题的:新建一个项目,对比Info.plis代码,修复旧的。
that works for me ..
这对我行得通 ..
回答by Sean Doyle
I had this problem as well - the problem turned out to be in the entitlements. I had get-task-allow set to NO instead of to YES. Once this was set properly everything worked again.
我也遇到了这个问题——问题出在权利上。我将 get-task-allow 设置为 NO 而不是 YES。一旦设置正确,一切都会再次运行。
回答by Gobea Alcoba Gonzalo
You need to register the device from Xcode.
您需要从 Xcode 注册设备。
General -> Signing -> Register.
一般 -> 签名 -> 注册。