Amit Kalra
Amit Kalra

Reputation: 4113

Xcode Project won't run on iOS Device

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

Answers (7)

Artsem Sharubin
Artsem Sharubin

Reputation: 418

if you using vpn services, then you need to turn off vpn. Works for me

Upvotes: -1

ninahadi
ninahadi

Reputation: 452

Make sure your device name doesn't have any emoji (Xcode 11.0)

Upvotes: 0

Arthur
Arthur

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

Steve Graff
Steve Graff

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

Amit Kalra
Amit Kalra

Reputation: 4113

Alright, it was a simple fix:

  1. Go into Xcode Preferences -> Accounts -> More Info. Hit the refresh icon.

  2. Clean your project. Project -> Clean.

  3. Force quit Xcode.

  4. Reboot Mac and Device.

Upvotes: 22

Oliver S
Oliver S

Reputation: 993

Unplugging iOS Device and plugging it back it in fixed it for me.

Upvotes: 48

Lorenzo
Lorenzo

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

Related Questions