Xcode Cannot Run on the Selected Destination

后端 未结 30 2513
梦如初夏
梦如初夏 2020-12-02 18:22

I was running my app this morning and now all of a sudden I am getting the following error when I try to run on the iPhone 5.1 simulator.

Cannot run on the selected

30条回答
  •  孤街浪徒
    2020-12-02 18:43

    The way I solved this error was by a adding dummy function to my project. My issue was my app had no code of its own, only linked-in code.

    I have an unusual situation with two projects: one "App" parent and one "Engine" child. All the compilable code is in the child and the parent simply links with the child, copying a ton of App-specific resources into the project.

    Apparently this saddens Xcode, resulting in the above error.

    My solution is adding this C function / file to the App project:

    int workaround_for_xcode_reporting_cannot_run_on_selected_destination(){return 0;}

提交回复
热议问题