Xcode 6.2 watchkit sample app doesn't start. \

2019-04-16 00:34发布

问题:

This question already has an answer here:

  • An error was encountered while running (Domain = LaunchServicesError, Code = 0) [duplicate] 31 answers

The watchkit sample app didn't start.

The message was "The operation couldn’t be completed. (LaunchServicesError error 0.)".

The sample app is "WatchKitCatalogUsingWatchKitInterfaceElements", which I got from the Apple Developer library.

I tried to reset the contents and settings of the iOS simulator.
Any ideas would be greatly appreciated.

回答1:

The bundle identifier of your watch extension and app have to be related to your iOS apps original bundle identifier. If you have "com.yourCompany.yourApp" as bundle identifier your extension has to be "com.yourCompany.yourApp.watchkitextension" and the watch app "com.yourCompany.yourApp.watchkitapp" Otherwise you get this confusing error.



回答2:

This can be caused by a number of problems. Please see the answer in the question this should be duped to:

An error was encountered while running (Domain = LaunchServicesError, Code = 0)