Can't launch my app in Instruments: At least one target failed to launch

后端 未结 9 686
天命终不由人
天命终不由人 2020-12-02 07:57

I have all my code signing entitlements set correctly. Running the app on my phone is fine, but launching it in instruments gives me an error message:

Error          


        
相关标签:
9条回答
  • 2020-12-02 08:47

    I achieved to solve this issue on my machine by doing this :

    • Generate a new Developer Provisioning Profile with your device in the list or at least make sure that your machine is in the list of the profile's device.
    • In Project settings -> Code Signing -> Provisioning Profile -> Debug : Set the newly created profile.
    • In Targets settings -> Code Signing -> Provisioning Profile -> Debug AND Release : Set the newly created profile.

    Hope that helps.

    0 讨论(0)
  • 2020-12-02 08:47

    None of the other solutions here fixed my problem, but I did determine that it was only a problem for me on the simulator. The device works fine. Perhaps there's an issue with the simulator.

    0 讨论(0)
  • 2020-12-02 08:50

    I realised what "At least one target failed to launch" means. It appears that both the development and release schemes (if you have a debug scheme and a release scheme) must have a development identity.

    I had the debug scheme selected when running the profiler and the message at the top of XCode said "Running debug". However, it seems that this is not sufficient.

    I changed my release scheme code-signing identity to be the same as the debug scheme (and also the provisioning profile), and the problem went away.

    0 讨论(0)
  • 2020-12-02 08:55

    it worke.. when i changed my profile schema to debug mode and also made sure, build configs has developer certificate in it. Thanks

    0 讨论(0)
  • 2020-12-02 08:56

    It is saying that you need to sign the app with a developer certificate (not a distribution certificate).

    In Xcode 5 just change the "Provisioning Profile" field for your "Release" build in the Build Settings to your developer certificate instead of your distribution certificate. For the duration of the testing anyway. Xcode doesn't allow you to build with a distribution certificate.

    Make sure that the project build settings do not override the target build settings or make the change in your project build settings.

    Don't forget to set the profile back after you're done with the testing.

    I do not recommend harrywynn's method, since it is better to profile the release build because then you are taking into account the compiler optimizations, and having the exact experience your users will.

    0 讨论(0)
  • 2020-12-02 08:56

    I encountered this problem with Xcode 9.1 for both simulators and devices, and my running scheme was already set as profiling with "Debug". Finally found this Apple forum discussion very helpful and got the problem resolved. In short, the solution that worked for me is ... Restart the Mac.

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