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

后端 未结 25 1243
天涯浪人
天涯浪人 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:07

    In case anyone has this problem in combination with cocoa pods, these steps helped me to solve this error (after few hours):

    • run pod cache clean
    • from SRC_ROOT run rm -rf Pods (optionally rm Podfile.lock)
    • Click on the Simulator app, click Simulator -> Reset Content and Settings...
    • Go into Xcode, In the Menu bar click Product -> Clean (or click Shift + Command + K).This will to clean your Xcode project.
    • Create a new Terminal Shell (From menu bar click Shell -> New Window)
    • run rm -rf ~/Library/Developer/Xcode/DerivedData/

    ...then try to Build & Run your project.

    Note: SRC_ROOT can be found by entering the Navigator, clicking on the project, clicking on the project again from the project and targets list, going into Build Settings, scrolling all the way to the bottom to the User-Defined Section, and the SRC_ROOT will be labeled as PODS_ROOT. Take that and copy it verbatum into the Terminal and proceed with step 2 from the list above.

    Hope it helps.

提交回复
热议问题