Xcode: Process launch failed - Security

2019-04-05 20:40发布

问题:

I am getting the "Process launch failed - security" error on Xcode 6 trying to build into an iOS 8.1 iPhone 5. I have reviewed the most relevant prior StackOverflow post and I have tried the following:

  1. Delete all prior Provisioning Profiles on the device.
  2. Click on the App icon to see if it will offer me a dialogue to say "OK" that I do want to launch the app.

Neither of these is successful. When I click on the app to see if it will offer me that dialogue (or launch my app), nothing happens. The icon blinks. That's it. Are there any other approaches I can take to resolve this? Right now the only way I can test my app on my device is via TestFlight...

回答1:

This is caused by expired or invalid provisioning profiles (usually where you have a matching bundle ID and two mismatched provisioning profiles bound to mismatched certificates).

  1. Delete all provisioning profiles on the device again (in the Xcode menu Window > Devices).
  2. Disconnect the device from your Mac and check in Settings.app to ensure all provisioning profiles have been cleaned (or at least the ones you think are causing the problem).
  3. Reboot your device and leave it unplugged.
  4. Delete all existing provisioning profiles from ~/Library/MobileDevice/Provisioning Profiles (you might want to back these up first). If you're logged into your Apple Developer account in the Xcode menu Xcode > Preferences > Accounts, existing/current Xcode-managed provisioning profiles will re-appear.
  5. Plug your device in again and it should be working.


回答2:

On your iPhone , go to settings->general->Device Management->"your account" and than trust your provisioning profile .



回答3:

In some cases you need to approve the developer (yourself in this case) and in case it doesn't ask you when pressing the app icon (could just give you dismiss option only) go to settings app-> general -> profiles -> You should see the profile there, click on that and approve as trusted.



回答4:

The answer for me was: The app has installed on your device. Tap the icon and open the application it will pop up a dialogue to say do you trust this app. OK and your away. See Xcode process launch failed: Security for more details



回答5:

Security issue comes from iOS9 and it is very simple to solve the issue. The alert is displayed like,

Could not launch "Hello World" process launch failed : Security

Its very simpler to solve the issue, just open "Settings" in your iPhone/iPad

Settings → General → Device Management / Profiles & Device Management → Developer App / Enterprise App → Trust

For Developer profile, you app will be under Developer App section and for Enterprise Profile your app will be under Enterprise APp section.

Clean and Run your project Its Done.