Application could not be verified error when building app for iPhone device

46,270

Solution 1

From this thread on ADC:

get-task-allow, when signed into an application, allows other processes (like the debugger) to attach to your app. Distribution profiles require that this value be turned off, while development profiles require this value to be turned on (otherwise Xcode would never be able to launch and attach to your app).

Solution 2

My problem was actually that I already installed the app via a testflight on my phone, after removing the app it worked!

Solution 3

I got it resolved by deleting already installed build from phone and then reinstall the build.

Solution 4

Check if your iPhone properly provisioned. You may connect iPhone and launch Organizer from XCode (Main Menu -> Window -> Organizer) and then check PROVISIONING PROFILES information.

After that you need to match Bundle Identifier (Project -> Info.plist) and your App ID. You may read this Apple Note Mismatch between App ID and Bundle Identifier

I had similar message boxes (two in a row) when my Bundle Identifier was incorrect.

Solution 5

Did you remember to expand Targets on the left of the project window, then right click on your app name > get info, then go to the Build tab and under Code Signing, under Code Signing Identity, change the value of Any iPhone OS Device to what applies in your case? Also in the properties tab you should have your identifier set so that it matches the identifier you chose.

Don't know if that helps, that's the step I found missing in your description though.

Share:
46,270

Related videos on Youtube

Codebeef
Author by

Codebeef

Freelance Rails and iOS developer based in Manchester, UK. Developer behind Bouldr and it's iphone app. More projects available on my site, along with my portfolio and a little more about me. If you have a project you'd like helping out with, I'm available for freelance work.

Updated on July 09, 2022

Comments

  • Codebeef
    Codebeef almost 2 years

    OK, I've just got myself a shiny new MacBook Pro, and having been developing my iPhone app on another MacBook, I wanted to migrate my development to my new computer.

    I've got to the stage where I can build the app and run it on the simulator no problem, but when it comes to running the app on my iPhone, I keep getting "The application could not be verified". I have installed a new developer certificate, and installed the provisioning profiles (all generated new), but I'm at a loss as to why I should still be getting the error.

    Anyone have any ideas as to where I'm going wrong?

    EDIT

    I've recreated the certificate and profisioning profile, etc... The Build succeeds, and the status at the bottom gets all the way to 'Installing on Device', then two modal dialogs are displayed with the same "Application could not be verified" error message.

    Is there any output I can get to that will give me a precise error?

    EDIT

    OK, I've got the appropriate log from Organizer showing the problem. It looks like I haven't set up the Entitlements.plist, but in xcode, I have. (I've added an Entitlements.plist fole, then unchecked get-task-allow, then added Entitlements.plist to the project settings under Code Signing Entitlements). The log is:

    Tue Jun 16 07:35:42 unknown mobile_installation_proxy[1162] <Error>: install_embedded_profile: Skipping the installation of the embedded profile
    Tue Jun 16 07:35:42 unknown securityd[1158] <Error>: mobile_installat[1162] SecItemCopyMatching: missing entitlement
    Tue Jun 16 07:35:42 unknown securityd[1158] <Error>: mobile_installat[1162] SecItemCopyMatching: missing entitlement
    Tue Jun 16 07:35:42 unknown securityd[1158] <Error>: mobile_installat[1162] SecItemCopyMatching: missing entitlement
    Tue Jun 16 07:35:42 unknown securityd[1158] <Error>: mobile_installat[1162] SecItemCopyMatching: missing entitlement
    Tue Jun 16 07:35:43 unknown mobile_installation_proxy[1162] <Error>: entitlement 'get-task-allow' has value not permitted by a provisioning profile
    Tue Jun 16 07:35:43 unknown mobile_installation_proxy[1162] <Error>: verify_executable: Could not validate signature: e8008016
    Tue Jun 16 07:35:43 unknown mobile_installation_proxy[1162] <Error>: preflight_application_install: Could not verify /var/tmp/install_staging.1WIVsB/BouldrData.app/BouldrData
    Tue Jun 16 07:35:43 unknown mobile_installation_proxy[1162] <Error>: install_application: Could not preflight application install
    Tue Jun 16 07:35:43 unknown mobile_installation_proxy[1162] <Error>: handle_install: Installation failed
    Tue Jun 16 07:51:53 unknown afcd[1181] <Error>: user mobile has uid 501
    Tue Jun 16 07:51:53 unknown afcd[1181] <Error>: mode is 0x41e8
    

    Can anyone shed any light on why this isn't working as expected?

    EDIT

    Got the build working, but I've not accepted an answer yet, as I have no idea as to what's going on. Anyone with any idea as to what is going on?

  • Jason George
    Jason George over 12 years
    +1 I've spent over an hour on google looking for this answer. Excellent!
  • Rivera
    Rivera over 11 years
    I just skipped the entitlements file and it worked for in-house distribution.
  • Luke
    Luke over 9 years
    This was similar in my situation; I already had the app installed via the App Store, and was attempting to overwrite it with a dev build and it did not work. Deleting the original off my device allowed Xcode to install the debug version!
  • Jack BeNimble
    Jack BeNimble about 9 years
    Worked for me as well. Interestingly, I ran into exactly the same situation on Android today, and the message was something along the lines of "The app must be uninstalled before you can install it on this device."
  • wfbarksdale
    wfbarksdale about 9 years
    This was my issue as well
  • Mischa Molhoek
    Mischa Molhoek about 9 years
    this did it for me :)
  • devios1
    devios1 almost 9 years
    @JackBeNimble And I bet 27,000 people didn't have to google what that message meant.
  • user_
    user_ almost 8 years
    I got this error when i overwrote an app which was downloaded with TestFlight. it's probably because I'm using a development profile whose team is different from the distribution profile's team.