Unable to run app in Simulator: An error was encountered while running (Domain = LaunchServicesError, Code = 0)

后端 未结 25 1108
天涯浪人
天涯浪人 2020-12-01 00:39

After successfully compiling the project in Xcode 6, I am unable to run it in the simulator with the above mentioned message. I did all the possible research, tried everythi

相关标签:
25条回答
  • 2020-12-01 01:02

    Thanks for pointing this out @Miki and kudos to you. I had the same issue as you yesterday (and I added ShareKit 3.0.0 from CocoaPods to the app a few days ago). I suspected ShareKit giving me this problem, but now I can be confident of exactly which library is causing this. Here is what I found in my log (if it can benefit others):

    Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x7fa836097aa0 {Error=PackageInspectionFailed, ErrorDescription=Failed to load Info.plist from bundle at path /Users/{UserName}/Library/Developer/CoreSimulator/Devices/99FEB34E-6F00-4EFA-861A-A6985AFE96D8/data/Library/Caches/com.apple.mobile.installd.staging/temp.X7eead/extracted/{AppName}.app/Frameworks/LiveSDK.framework}

    0 讨论(0)
  • 2020-12-01 01:02

    I hade exactly the same problem and it was ShareKit.

    On the simulator I had "Error Domain=LaunchServicesError Code=0".

    On the iPhone6 device I had "App installation failed Could not inspect the application package."

    When I removed ShareKit it worked.

    0 讨论(0)
  • 2020-12-01 01:03

    I removed all my pod files and replaced them all, seems the problem for me was the bolts framework was old, and causing this error. I did a clean & reset content and now it's all good.

    0 讨论(0)
  • 2020-12-01 01:04

    "Reset Content and Settings" from iOS Simutalor menu options and launching simulator after Quitting solved my issue.

    Reset Content and Settings

    0 讨论(0)
  • 2020-12-01 01:04

    I tried every other solution listed here. Well, I ported my project from Swift 1.2 to Swift 2.0. The application was stuck even after a lot debugging and launch services error 0 was reported.

    solution: It happens because of framework compilation.

    App target -> Build Phases -> Embed Frameworks.

    So mark copy only when installing on. Clean the project and run it!

    0 讨论(0)
  • 2020-12-01 01:04

    Have the same problem after localizing my app. Especially Info.plist. Seems I had empty CFBundleShortVersionString in InfoPlist.strings, after fixing that the simulator started to work properly.

    0 讨论(0)
提交回复
热议问题