XCode fails to run app on device, saying the program being debugged is not being run

前端 未结 14 1053
轻奢々
轻奢々 2020-12-14 16:35

I\'m running Xcode, trying to get my app to run on my iphone. I\'m getting the error message \"the program being debugged is not being run.\"

14条回答
  •  一生所求
    2020-12-14 17:16

    I have two developer identities (work and home) and use the same device for development. I also use a wildcard app identifier (xxxxxxxxxx.*) at home, and I often build different apps using the same profile. Sometimes when I switch locations (e.g. from work to home) I get the above error.

    Removing and re-adding the developer profiles from the device, reloading the profile from Apple and restarting the device (in various combinations) did not solve the issue for me.

    What did enable running and debugging on the device again was:

    • go to project settings in Xcode (double-click project name)
    • search for "identity" to find the setting "Code Signing Identity" / "Any iOS"
    • tick "iPhone Developer: My Name (mydevid)" under the section for my home profile (for Application Identifiers '*')
    • do not tick "iPhone Developer:" under "Automatic Profile Selector", even if it "currently matches" the same developer ID and profile

    (I also quit Xcode and did rm -rf build, but that is probably not needed).

提交回复
热议问题