Xcode "Could not launch". Only reports "Security" as error
Asked Answered
C

11

104

I've edited the app name out. Other than that the dialog is exactly like this. I'm developing an enterprise app and I've tried restarting xcode and the iPhone I'm developing on. No change. Anyone encountered this? Are there any log posts that could point me in the right direction or get me more details. There is nothing in the regular log from what I can see.

Could not launch

Update

Found this in the device log:

<Warning>: Unable to launch com.bundleID.etc because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.

Which is a bit weird since it worked yesterday and all profiles etc. were issued a week ago.

Cascade answered 1/10, 2013 at 9:36 Comment(2)
I seriously tried to click the OK button a few times :|Wingless
It happened when my iPhone is in offline. When I clicked the app it shows an alert like Title: "Unable to Verify App" . Description: "An internet connection is required to verify trust of the developer "About the certificate" . This app will not available until verified." This means we need an online connection to verify the app'Southland
C
245

Apparently after upgrading the OS and such you must manually launch the app on the device and say that you trust the developer of the software.

That error message disappeared now.

Cascade answered 1/10, 2013 at 10:20 Comment(3)
The "has not been explicitly trusted by the user" part of the device log made me think. Then I just poked around for a bit and when opening the app asked for consent. I remembered the "explicitly trusted by the user" part and thought that might be it. It was.Cascade
The "failed to get the task for process XXX" is likely because you are using an Enterprise provisioning profile (or a Distribution provisioning profile) and not a Developer provisioning profile.Hyposthenia
This method stops working if you delete and reinstall the app (which is sometimes needed for clearing all caches, etc.). As perk @Mark answer, deleting all your phone provisioning profiles is a more permanent solution.Grommet
B
27

Using xcode 7 with an iOS device running version 9.2, I had to:

  1. Open 'Settings'
  2. Tap 'General'
  3. Tap 'Device Management'
  4. Tap 'Developer App' that's in the list
  5. Tap 'Trust (developer name)'
  6. Tap 'Trust' in the popup

The app should load and launch when you run xcode.

Barhorst answered 11/12, 2015 at 0:33 Comment(1)
ya, this need to be set at iphone manually and the hints will be displayed when you click on the app in iPhoneSunglasses
D
6

I had the problem of not having the app on my device, so I couldn't manually launch it to accept the prompt. For me, I got this to work after deleting all expired provisioning profiles from my device, which forced Xcode to install a new one.

After this, I was able to get my app to run.

Drinkwater answered 25/4, 2014 at 18:37 Comment(0)
J
6

I just got this issue running on an iOS 8 device for the first time as it required me to launch manually on the device (it copies it fine but doesn't launch it) and then state that I trust the developer.

Jackinthebox answered 21/9, 2014 at 20:0 Comment(0)
L
5

I had the same issue solved like this:

It can be happen because your developer profile is not assigned as TRUSTED in your phone or watchos settings.

You can set your profile as TRUSTED as below:

  • Go to Settings,
  • Profile
  • Assign your profile as Trusted there.
Lovato answered 18/9, 2015 at 14:4 Comment(0)
O
4

If you sign the app with Enterprise provisioning you will get this error. It will still install the app on your phone, but apparently you cannot debug an app signed this way. You must either sign the app with Developer provisioning or manually launch the app in the phone.

Onetime answered 14/8, 2014 at 18:15 Comment(0)
C
3
  1. Choose Window->Devices.
  2. Right click on the device in left column, choose "Show Provisioning Profiles".
  3. Click on the provisioning profile in question.
  4. Press the "-" button Continue to removing all affected profiles.
  5. Re-install the app.
Cecum answered 5/12, 2014 at 6:44 Comment(1)
For me, uninstalling the app from device, doing the above, then installing the app worked for me.Appaloosa
B
3

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

Be sure to tap the app icon while the Xcode alert is still shown. Otherwise the app will not run.

  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.

Belligerent answered 24/1, 2015 at 0:43 Comment(0)
L
3

Happened to me when my iPhone was in offline mode. Giving it access to the Internet fixed the problem.

Lukelukens answered 15/3, 2021 at 12:57 Comment(2)
I think I needed to do both this and the answer below about TrustingProbably
@AndyWeinstein yeah but the latter one is obviousLukelukens
T
0

I had the same problem as above and resolved it by changing the code signing identity to iOS Developer

(I had tried all of the other steps above first)

I can now run the app in xcode and see debug output

Triptych answered 24/6, 2015 at 9:27 Comment(0)
P
0

My solution was, use Internet on your phone cause the app must verify the email, then build again, this time will show a popup in which you can press trust and now everything works fine.

Side note: I'am developing with Flutter

Phenology answered 20/1, 2022 at 12:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.