Xcode 4.4 - There was an internal API error

风流意气都作罢 提交于 2020-01-13 08:29:08

问题


Hi I just upgraded to Mountain Lion. I created an empty Single View Application and run it. The first time it runs fine but the next runs will give me the "There was an internal API error" pop-up warning TWICE. It's the same with my other projects. They run okay once but gets this error the next runs. There was no warning or any specific warning message of any kind.

Any idea how to solve this?

Would really appreciate your help.


回答1:


I have it working on iOS6 Beta 4!! This is what I did but other variations may also work:-

  1. Install XCode 4.5 Developer Preview 4
  2. Delete your app from the device
  3. Run your app from Dev Preview 4
  4. Delete your app again (not sure if you have to do this)
  5. Return to XCode 4.4.1
  6. Run your app, stop running, run again!!!

Of course you could continue developing in 4.5, but I prefer to wait.

Installing 4.5 Beta 4 installs updated device support. Once this is done once (possibly on any device) it should work fine. If you use the same device on a different machine you will have to again run it once from 4.5 Beta 4 before using your preferred version of Xcode (You do not need to delete the app from your device this time).

Edit: I am pretty sure that if you make a change to your core data you will need to run from 4.5 for the first time also.




回答2:


Don't know if this helps, but I've deleted all files in ${HOME}/Library/Developer/Xcode/iOS DeviceSupport and it worked as a charm (Xcode 4.4.1, OSX 10.7)




回答3:


I had this problem when I upgraded my device to Preview4 but had my MBP still running Xcode Preview3. Updating to Xcode Preview4 made the problem go away for me, no restarts necessary.




回答4:


Deleting the app manually from the device/simulator will allow you to build and run successfully. A long term solution is to not use a Beta Xcode :)




回答5:


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).

If you run your app with XCode 4.5 preview & IOS6 Beta 4, the second time you run your app on the device, you'll get the internal API error.

In theory, you cannot use XCode 4.4 to compile on your iOS6 Beta 4 iPhone.

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...

And of course, XCode 4.4 doesn't generate the api error...




回答6:


I have Xcode 5.0.2 and iPhone with iOS 7.0.6.

Every time when I launched my project on iPhone, I saw "There was an internal API error". And it was launched on simulator without any problems.

I did all the stuff that usually helps (like remove an app, clean, restart Xcode, restart a mac, etc.).

This problem went away only after I restored the iPhone. Sad but true. I don't know so far, why it appeared.



来源:https://stackoverflow.com/questions/11715909/xcode-4-4-there-was-an-internal-api-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!