777

I have been developing an app for 1 or 2 weeks now and just yesterday I have updated my iPhone 5S to the iOS 8 GM. Everything worked fine and I could test on my device as well until I deleted the app from my phone and wanted to build again. The following error appeared:

Could not launch "My App"
process launch failed: Security

Screenshot added

When I test with the simulator it works fine. Is this because of the iOS 8 GM update and how can I fix this launch problem? I want to be able to test on my iPhone and in the simulator.

Bhavin Ramani
  • 3,133
  • 5
  • 29
  • 41
Tom Spee
  • 8,939
  • 4
  • 26
  • 47

14 Answers14

1633

If you get this, the app has installed on your device. You have to tap the icon. It will ask you if you really want to run it. Say “yes” and then Build & Run again.

As from iOS 9, it is required to go to SettingsGeneralDevice ManagementDeveloper AppTrust`.

On some versions of iOS, you will have to go to SettingsGeneralProfile instead.

Philippe Fanaro
  • 2,422
  • 1
  • 17
  • 44
SushiGrass Jacob
  • 19,278
  • 1
  • 23
  • 39
  • 45
    It may appears on the first time to launch your first app using a new provisioning profile. – ryutamaki Sep 23 '14 at 02:54
  • 9
    ** be sure you also see below. My only solution was to DELETE OLD PROVISIONING PROFILES. Also see the comment about using the delete key with your mouse. – Jason R. Escamilla Oct 08 '14 at 01:06
  • 4
    I've had both solutions work. On the first time you install the app, this works. If this is happening over and over and over again, nuking all your old provisioning files works. – DesignatedNerd Nov 16 '14 at 23:47
  • 2
    Make sure to tap the app icon on your phone **while the Xcode alert is showing**. If you press "ok" in Xcode, first, the "trust?" prompt on your phone may not appear. – pkamb Jan 23 '15 at 21:04
  • 1
    Wish I could vote twice for this, it's not the first time I've been here! – kwahn Feb 24 '15 at 21:31
  • 29
    Thanks. Apple has the absolute worst error messages. – Elad Mar 25 '15 at 14:10
  • 2
    I understand this is a popular answer, but this doesn't remedy the issue of first time startup. Please consider the answer below by @nickthedude – Dru Freeman May 31 '15 at 04:51
  • 1
    This is no longer the case for Xcode 7 / iOS 9. The answer (http://stackoverflow.com/a/30888983/42484) is correct for the new software. – Greg Jul 02 '15 at 18:43
  • Not the correct answer because it only temporary fixes the problem, as soon as you will delete the app on your device and rebuild it the problem will reappear again. For an appropriate solution please check the @nickthedude answer (I tested it on Xcode 6.4 and it worked like a charm). – King-Wizard Sep 08 '15 at 10:31
  • It is not asking for yes or no. It is just asking to cancel. Change the settings @sushiGrass how to do? – Bhupesh Kumar Oct 06 '15 at 11:16
  • 66
    @BhupeshKumar et. al, in iOS 9 it no longer allows you to trust the source directly from the alert. you have to go to Settings -> General -> Profile and locate your developer profile and trust it – jtmarmon Oct 12 '15 at 22:08
  • 11
    On iOS 9.2 the setting moved to Settings -> General -> Device Management – RickNotFred Dec 16 '15 at 15:01
  • 2
    I find the error everytime I try to run the application when the device is not connected to internet. Connecting to internet and then building again has solved it for me. – Nakul Sudhakar Jan 22 '16 at 09:40
  • 1
    It is possible to see this error even after trusting. If you turn off networking (airplane mode) on the iPhone, Xcode will refuse to install the latest build. It is necessary to turn the network on again before it will work. – Jeff Muir Jun 28 '17 at 04:14
201

Updated answer for Xcode 7: Tapping the app no longer works (as of beta 1 it just displays an "untrusted enterprise developer" message with only a Dismiss button).

To fix, open the Settings app, go to General / Profiles, and you'll see your profile. Mark it trusted and things should start working normally again.

Updated For iOS 9.2.1 and Xcode 7.2.1:

Goto: Settings > General > Device Management > Select App from Developer Apps > Trust App.

Bista
  • 7,689
  • 3
  • 24
  • 52
  • 4
    I don't have my profile in the Settings. Any suggestions? Tried downloading the provisioning profiles and manually adding them to the device. – dashersw Jul 09 '15 at 19:57
  • 1
    see the answer of nickthedude who solved my problems in XCode7 – Christian Aug 13 '15 at 08:57
  • See the answer of @nickthedude which definitely fixed the problem on Xcode 6.4. – King-Wizard Sep 08 '15 at 10:37
  • To the people who don't see the 'Profiles' option under Settings/General: it's only shown if there is one or more profiles installed. It should be under 'VPN' if there is a profile installed. – sheltond Jan 14 '16 at 14:54
  • 2
    On my iPhone6s running iOS 9.2.1, my profile is under General->Device Management. Then I see my email in DEVELOPER APP. I can click on this and select a Trust option. – user3731622 Jan 23 '16 at 03:09
158

Hey so the accepted answer works, except if you need to debug the initial launch of the app. However I think that answer is more of a work around, and not an actual solution. From my understanding this message occurs when you have some weirdness in your provisioning profile / cert setup so make extra sure everything is in tip-top shape in that dept. before ramming your head against the wall repeatedly.

What worked for me was as follows from the apple docs:

Provisioning Profiles Known Issue If you have upgraded to the GM seed from other betas you may see your apps crashing due to provisioning profile issues.

Workaround:

  1. Connect the device via USB to your Mac

  2. Launch Xcode Choose Window ->Devices

  3. Right click on the device in left column, choose "Show Provisioning Profiles"

  4. Click on the provisioning profile in question

  5. Press the "-" button Continue to removing all affected profiles.

  6. Re-install the app

Make sure you right click on the image of the device not the name of the device or you won't see the provisioning profiles option. I restored my new phone from an old backup and there was a lot of cruft hanging around, i also had 2 different dev. certs active (not sure why) but i deleted one, made a new profile got rid of all the profiles on device and it worked.

Hope this helps someone else.

Community
  • 1
  • 1
nickthedude
  • 4,835
  • 8
  • 33
  • 50
  • 2
    I had upgraded to an iPhone 6 using a restore from my iPhone 5S. I would get the security question every time I deleted an app and did a build/run while debugging. I followed the directions, actually removing every provisioning profile, because selectively removing didn't work for me (I have tons of provisioning profiles). No longer get the security question. Thanks! It was driving me nuts. – Del Brown Sep 24 '14 at 19:45
  • 6
    This worked. It looks like if you're setting up a new device from a backup the provisioning profiles are also copied to the new device. These profiles will not be valid for new device. I removed all profiles from the device, re-ran from Xcode and everything worked as expected: No more prompt. – iksnae Sep 25 '14 at 13:58
  • 4
    This should be marked as the correct answer! Tip for devs who have a lot of apps + profiles, create an Automator workflow and have it loop x number of times to do the delete for you. Speed up the "Watch Me Do" action to 5x, then add a .9 second Pause action between iterations. – Imran Oct 09 '14 at 03:16
  • 5
    This this this is the correct answer. Thank you for getting to the bottom of this. I was needing to debug first launch and you saved my day. – Paul Cezanne Nov 06 '14 at 16:28
  • looks like it works for someone, but not for me. i delete all the provisioning file from my device, but this message still pop up every time. did i miss any step in between? – Xu Yin Nov 13 '14 at 17:46
  • This helped me out! I was already using development provisioning profile and still seemed to have issues until I deleted all profiles from device and run with my latest dev profile. I also refreshed my profiles via Xcode > Preferences > Accounts > Apple IDs > View Details > Refresh button. – kalana Feb 12 '15 at 08:13
79

Update for iOS9.2.1 and Xcode 7.2.1

If you get this error when building to a device in Xcode:

Error Image for Xcode Build

On your device, tap the app icon that would have just been added from your attempt at building the app and you should see this:

enter image description here

Next, on your device, go to Settings --> General --> Device Management, and you will see this page:

enter image description here

Select the profile you are using with Xcode, and you should see this page: enter image description here

Click Trust "username@email.com" then click Trust on the next popup.

Go back to Xcode and re-run your project and it should build the app to your device.

pkamb
  • 26,648
  • 20
  • 124
  • 157
Ben Cochrane
  • 2,859
  • 1
  • 12
  • 15
22

To get around the process launch failed: Security issue and immediately launch the app on your device, tap the app icon on your iOS device after running the app via Xcode.

This will allow you to immediately run the app. It may not actually "fix" the root issue that is causing these permission alerts.

Be sure to tap the app icon while the Xcode alert is still shown. Otherwise the app will not run. I continually forget this vital step and am unable to run the app on my device. Thus I am documenting it here for myself and everyone else :)

  1. Run the app via Xcode. You will see the security alert below. Do not press OK.

Could not launch "AppName" process launch failed: Security

  1. On your iOS device, tap the newly installed app icon:

tap the app icon on your iOS device

  1. After tapping the icon, you should now see an alert asking you to "Trust" the Untrusted App Developer. After doing so the app will immediately run, unconnected to the Xcode debugger.

    • If you do not see this "Trust" alert, you likely pressed "OK" in Xcode too soon. Do not press "OK" on the Xcode alert until after trusting the developer.

Trust this developer?

  1. Finally, go back and press "OK" on the Xcode alert. You will have to re-run the app to connect the running app on your iOS device to the Xcode debugger.

Now press OK in Xcode.

pkamb
  • 26,648
  • 20
  • 124
  • 157
  • That's one-timed fix. After you made a clean install, those warnings would appear again. – Vitalii Vasylenko Mar 13 '15 at 08:41
  • Not the correct answer because it only temporary fixes the problem, as soon as you will delete the app on your device and rebuild it the problem will reappear again. For an appropriate solution please check the @nickthedude answer (I tested it on Xcode 6.4 and it worked like a charm). – King-Wizard Sep 08 '15 at 10:35
10

I have the same issue. I click ok in xcode and when launching the app on my iPhone I'm asked if I want to trust this application. Doing it, the app runs and further build-and-run from xcode went without any issue until deleting the app from the iPhone and reinstalling it. Then goto first line ;-)

Christian
  • 506
  • 4
  • 14
  • It is kinda strange because I already did that but now it is working again, thanks! – Tom Spee Sep 13 '14 at 17:19
  • Not the correct answer because it only temporary fixes the problem, as soon as you will delete the app on your device and rebuild it the problem will reappear again. For an appropriate solution please check the @nickthedude answer (I tested it on Xcode 6.4 and it worked like a charm). – King-Wizard Sep 08 '15 at 10:33
10

Alternatively if one does not see "Untrust App Developer" dialog:

Go to your iPhone > Settings > General > Profile > "you@email.com" > Trust

David Andreoletti
  • 3,552
  • 3
  • 27
  • 47
10

SETTINGS -> GENERAL -> Profiles & Device Management choose the developer profile and push Trust.

if you do not have Profiles & Device Management menu you have to enroll your device on beta.apple.com and download the profile from Safari.

  1. install the profile
  2. Restart your device
  3. tap on the developer profile and trust.

You are all set.

kavehmb
  • 9,040
  • 1
  • 15
  • 22
8

In iOS 9.2 they renamed the 'Profiles' to 'Device Management'

This is how you should do it now:

  1. Settings -> General -> Device Management
  2. Verify the app
Plus7
  • 141
  • 1
  • 7
2

Ok this this seems late and I was testing the app with internet connection off to test my app for some functionality. As I turned off the internet it gave me such error. After I turned on the internet I can install again. I know this is silly but this might be helpful to someone

zizutg
  • 622
  • 9
  • 15
0

Xcode is able to build and install the app, but isn't able to launch it the first time. You just need to tap on the app's icon on the phone, then you will be prompted to ask if you want to trust the developer. Allow it and the app will launch, then Xcode will be able to automatically install & launch this and your other apps.

Wookie
  • 702
  • 8
  • 12
  • Not the correct answer because it only temporary fixes the problem, as soon as you will delete the app on your device and rebuild it the problem will reappear again. For an appropriate solution please check the @nickthedude answer (I tested it on Xcode 6.4 and it worked like a charm). – King-Wizard Sep 08 '15 at 10:33
0

"If you get this, the app has installed on your device. You have to tap the icon. It will ask you if you really want to run it. Say “yes” and then Build & Run again."

To add to that, this only holds true the moment you get the error, if you click OK, then tap on the app. It will do nothing. Scratched my head on that for 30 odd minutes, searching for alternative ways to address the problem.

David van Dugteren
  • 3,238
  • 8
  • 31
  • 47
  • Not the correct answer because it only temporary fixes the problem, as soon as you will delete the app on your device and rebuild it the problem will reappear again. For an appropriate solution please check the @nickthedude answer (I tested it on Xcode 6.4 and it worked like a charm). – King-Wizard Sep 08 '15 at 10:34
0

BTW, this also happens if you change the team of your target in Xcode and rebuild. Was quite puzzled to see that problem with an app that I had run on the device before. Took me a while to figure out… Might only happen the first time building to a device with a team, though.

Florian
  • 264
  • 1
  • 4
  • This is the correct answer. Changing developer program from personal to corporate has caused this alert – Alex Stone Mar 27 '15 at 15:01
  • Not the correct answer because it only temporary fixes the problem, as soon as you will delete the app on your device and rebuild it the problem will reappear again. For an appropriate solution please check the @nickthedude answer (I tested it on Xcode 6.4 and it worked like a charm). – King-Wizard Sep 08 '15 at 10:35
0

I had this issue before on Xcode 7 cause then i realized it's all about my internet connection it was down and the security check using the internet to make sure your developer account is correct. and when it see no internet it give this error … after i have fixed my internet it works good.

Ahmed El-Bermawy
  • 1,678
  • 1
  • 11
  • 13