Xcode "Could not launch". Only reports "Security" as error

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.


Solution 1:

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.

Solution 2:

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.