"There was an internal API error." while running an app on any iPhone/iPod-touch device
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.
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 ...
<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.
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