2

Yesterday i was testing my app in the iOS simulator and everything was working fine. I then decided to run the app on my iPhone and i got the error unable to install application, Unknown error occurred this has happened before so I cleaned my build folder (as this has fixed this issue before) however, the same error occurred. I then ran the app in the iOS simulator again and now i get the error Unable to run app in Simulator, An error was encountered while running (Domain = LaunchServicesError, Code = 0). I find this very weird as i didn't change anything besides trying to run the app on my iPhone. I have tried every solution given on this post and still no luck.

I'm sorry if my question doesn't contain much detail but as I said I didn't change anything and it was building and running fine a minute before plugging in my iPhone and trying to run it on there.

Any help would be much appreciated.

edit

I tried running other projects (with and without extensions) and they are working on both simulator and iPhone, therefore the problem must be within my project. (my project does have a today extension)

Community
  • 1
  • 1
Jarryd Baillie
  • 473
  • 5
  • 17
  • possible duplicate of [An error was encountered while running (Domain = LaunchServicesError, Code = 0)](http://stackoverflow.com/questions/25632886/an-error-was-encountered-while-running-domain-launchserviceserror-code-0) – Jeremy Huddleston Sequoia Dec 04 '14 at 05:16

4 Answers4

4

In that kind of cases I usually :

  • Product > Clean
  • Close xCode
  • Delete the Derived Data (in ~/Library/Developer/Xcode/DerivedData subfolders)
  • Delete the app on the iPhone
  • Reboot the iPhone
  • Restart and rebuild
Axel Guilmin
  • 10,343
  • 7
  • 49
  • 59
2

I had this problem. In my case, it was caused by the Build value being blank. After putting a value there, and resetting the simulator once more, the issue went away.

pete-01
  • 352
  • 2
  • 3
0

I had the same problem and checking the system log carefully helped me to identify a coliding library that was causing this error. You can also check this answer if you are using extensions.

Community
  • 1
  • 1
Miki
  • 1,232
  • 1
  • 9
  • 10
0

Generally it means there is a problem with the build, it may be due to old cache (solved by a clean build) or a project definition error (missing library, bad definition in info.plist, etc).

In my case it happened only on iOS 8, turns out that my widget had the wrong bundle ID.

Kof
  • 21,153
  • 8
  • 50
  • 77