简体   繁体   English

“存在内部API错误。”在任何iPhone / iPod-touch设备上运行应用程序时

[英]“There was an internal API error.” while running an app on any iPhone/iPod-touch device

I am in the process of submitting an iPhone app to the App Store. 我正在向App Store提交iPhone应用程序。 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: 在对应用程序进行最后的修改时,当我收到此消息时,我正在我的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. 我应该非常感谢有关该主题的任何提示或想法。

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. 当我试图运行已经安装在我的iOS设备上的应用程序时,我在Xcode 4.5 beta 4上遇到了同样的问题。 You could try to remove your app from device and make sure you are using Developer profile for signing. 您可以尝试从设备中删除您的应用,并确保使用开发者资料进行签名。

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. 通过与工作版本的比较,我发现我的info.plist中有一个有问题的'UIRequiredDeviceCapabilities'有问题。 A little figure digging showed it had to be an Array or Dictionary, and not a string as was my case. 一个小小的挖掘表明它必须是一个数组或字典,而不是我的情况下的字符串。 Setting it thusly ... 这样设定......

<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,这发生在部署过程中,甚至在应用程序下线到设备之前。

my problem was using a distribution profile, forgot to change back to a developer profile and that was what caused the internal api error. 我的问题是使用分发配置文件,忘记更改回开发人员配置文件,这是导致内部api错误的原因。 hope it helps someone 希望它可以帮到某人

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 您需要将项目名称更改为英文名称的州

I had the same issue. 我遇到过同样的问题。 My case was an iPhone that was used for the first time on the laptop. 我的案例是第一次在笔记本电脑上使用的iPhone。 I fixed it by opening the project in XCode with the iPhone plugged in. Xcode will then say "Processing symbol files". 我通过插入iPhone在XCode中打开项目来修复它.Xcode然后会说“处理符号文件”。 When finished, deploying on iPhone worked from within the QT Creator. 完成后,在iPhone上进行部署就可以在QT Creator中进行。

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. 我猜你可能已经测试了来自不同分支的构建,然后试图切换回你的。

I deal with same problem, but because of manually deleting "Application/Myapp" folder. 我处理同样的问题,但因为手动删除“Application / Myapp”文件夹。 I copied back the files and uninstall it. 我复制了文件并将其卸载。 Then I tried to run it using Xcode. 然后我尝试使用Xcode运行它。 Now every things is OK. 现在一切都好。

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. 我把get-task-allow设置为NO而不是YES。 Once this was set properly everything worked again. 一旦设置得当,一切都会再次奏效。

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 .. 这对我行得通 ..

You need to register the device from Xcode. 您需要从Xcode注册设备。

General -> Signing -> Register. 一般 - >签名 - >注册。

我删除了一天的扩展/小部件而忘记删除了exteion被列为插件的Embed App Extensions项目

I had the same issue when I tried running my project from a different Mac than it was created. 当我尝试从不同的Mac运行我的项目时,我遇到了同样的问题。

My issue was in the info.plist file. 我的问题出在info.plist文件中。 We were only able to figure it out after recreating the project from scratch and adding one file at a time and trying to debug it. 在从头开始重新创建项目并一次添加一个文件并尝试调试它之后,我们才能弄明白。

Replaced the following the info file: 替换了以下信息文件:

  1. CFBundleDevelopmentRegion Language en name with $(DEVELOPMENT_LANGUAGE) CFBundleDevelopmentRegion语言名称与$(DEVELOPMENT_LANGUAGE)
  2. CFBundleExecutable Name with $(EXECUTABLE_NAME) 带有$(EXECUTABLE_NAME)的CFBundleExecutable名称
  3. CFBundleName Name with placeholder $(PRODUCT_NAME) 带有占位符$(PRODUCT_NAME)的CFBundleName名称

Remove 去掉

CFBundleSignature CFBundleSignature

Screenshot of Diff file Diff文件的屏幕截图

I turned off my iPhone and when I turned it back on, it worked! 我关掉了我的iPhone,当我把它重新打开时,它工作了!

After I tried everything, I noticed that it worked on another iPhone, so I tried everything on the device where it did not work. 在我尝试了所有内容之后,我注意到它在另一部iPhone上工作,所以我在设备上尝试了一切不起作用的东西。 So unfortunate that this unexpected trick had to be the solution for me. 很不幸的是,这个意想不到的伎俩必须成为我的解决方案。

As explained in another post with the same problem, it sounds crazy but you can also not use the Beta version of Xcode 4. However, you must keep it in your left hand to authorize your iPhone to compile with the non Beta version (don't ask me why, it works). 正如在另一篇有相同问题的帖子中所解释的那样,听起来很疯狂,但你也不能使用Xcode 4的Beta版本。但是,你必须用左手保留它以授权你的iPhone使用非Beta版本编译(不要问我为什么,它有效)。

If you run your app with Xcode 4.5 preview & iOS 6 Beta 4, the second time you run your app on the device, you'll get the internal API error. 如果您使用Xcode 4.5预览版和iOS 6 Beta 4运行应用程序,则第二次在设备上运行应用程序时,您将收到内部API错误。

In theory, you cannot use Xcode 4.4 to compile on your iOS6 Beta 4 iPhone. 理论上,你不能在你的iOS6 Beta 4 iPhone上使用Xcode 4.4进行编译。

But... 但...

It seems that, if you launch Xcode 4.5 Preview, connect your iPhone (so it is recognized), run the application on it (even if you get the error), quit Xcode 4.5, launch Xcode 4.4 and .. tadaaaa... your iPhone is now recognized as an authorized device to compile on... 似乎,如果你启动Xcode 4.5预览,连接你的iPhone(因此它被识别),在它上运行应用程序(即使你得到错误),退出Xcode 4.5,启动Xcode 4.4和.. tadaaaa ...你的iPhone现在被认为是一个可以编译的授权设备......

And of course, Xcode 4.4 doesn't generate the API error... 当然,Xcode 4.4不会产生API错误......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为防止应用程序在iPod touch上运行,info.plist上的设置是什么? - What is the setting to on the info.plist to prevent the app from running on an iPod-touch? 将我的应用程序构建到ipod touch时出错:使用SDK“设备-iPhone OS 3.2”不支持仅将“ Targeted Device Family”设置为iPhone(“ 1”)进行构建 - Error building my app to my ipod touch:building with 'Targeted Device Family' set to iPhone only ('1') not supported with SDK 'Device - iPhone OS 3.2 iPhone或iPod Touch作为测试设备 - iPhone or iPod Touch as test device 在iPod Touch上运行的iPhone应用程序 - iPhone Apps running on iPod Touch 如何在他人的iPhone / iPod Touch设备上安装我的应用程序 - How to install my app on other's iphone/ipod touch device 在设备上运行iPhone应用程序时出错 - Error while running the iPhone app on device 是否可以使用iPod Touch 4开发适用于iPhone和iPod Touch的iOS应用程序并发布? - It is possible to use a iPod Touch 4 to develop iOS app running and published for both iPhone and iPod Touch? 使用 iOS 确定设备(iPhone、iPod Touch) - Determine device (iPhone, iPod Touch) with iOS 在带有IOS 5的iPod touch 4g上运行应用程序后出现图标错误 - Icon error after running app on an iPod touch 4g with IOS 5 预测iPhone / iPod Touch应用的性能 - Predicting performance for an iPhone/iPod Touch App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM