Reputation: 4113
Xcode gives me this message every-time I try running my app on my iPhone. (Works fine on the simulator.) (And this occurs in every project I have.) (I also just downloaded Xcode again.)
This is the message I get.
App Installation Failed.
Unknown Error Occurred.
How do I fix this error?
Upvotes: 19
Views: 16822
Reputation: 418
if you using vpn services, then you need to turn off vpn. Works for me
Upvotes: -1
Reputation: 41
I have this issue regularly. There are a number of techniques that help me overcome it, including the classic "turn it off and back on again."
One thing that isn't mentioned here is that the iPhone should be switched on, unlocked, connected to the mac and then the app should be run (with the iPhone unlocked). Don't lock it!
Upvotes: 0
Reputation: 308
After following the suggestions in this thread (restarting iPhone, cleaning Xcode project, quitting and re-launching Xcode) and others (setting Team to None then back to my Team) and unplugging and replugging Lightning connector from my iPhone 6 I was still experiencing this problem. Xcode would even display an error that my iPhone 6 was locked, even though it was not.
I was able to fix it by unplugging the USB-A connector of the USB to Lightning cable from my MacBook Pro, then plugging it back in. I'm not sure why that made the difference, but glad that it did resolve this annoying problem.
Upvotes: 1
Reputation: 4113
Alright, it was a simple fix:
Go into Xcode Preferences -> Accounts -> More Info. Hit the refresh icon.
Clean your project. Project -> Clean.
Force quit Xcode.
Reboot Mac and Device.
Upvotes: 22
Reputation: 993
Unplugging iOS Device and plugging it back it in fixed it for me.
Upvotes: 48
Reputation: 3387
If you have the same App but downloaded from AppStore, I suggest to remove the App manually from your device, then try to run the new version with XCode.
Upvotes: 2