251

I have two iphone devices( 4s and 5 ) connected to my computer and i am trying to install an application in both the devices. It installs pretty well in iphone 5 but it gives an error 'The application could not be verified.' when attempted to install in the iphone 4s device.

The UDIDs of both the devices have been added in the provisioning profile generated for the application.

Also, to add a note, I have just updated my iphone version to 8.1.3 in my 4s device. I am not sure though if the error has anything to do with it.

Any help on this would be much appreciated. I have been stuck on this for some time now.

EDIT:

I just connected this to another iPhone device and the issue seems to be there again. Basically this means that the app, for some reason, installs only in the phone which I have been using for some time now and not in any other phone. Once again, I am pretty sure that the provisioning profile contains the UDIDs of all these 3 devices.

Sunil
  • 3,424
  • 2
  • 24
  • 25

18 Answers18

483

I had something similar happen to me just recently. I updated my iPhone to 8.1.3, and started getting the 'application could not be verified' error message from Xcode on an app that installed just fine on the same iOS device from the same Mac just a few days ago.

I deleted the app from the device, restarted Xcode, and the app subsequently installed on the device just fine without any error message. Not sure if deleting the app was the fix, or the problem was due to "the phase of the moon".

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • I dont have my app in the phone to uninstall and try :) This is my first installation attempt on this device. – Sunil Jan 30 '15 at 09:24
  • Thank you! I have been wracking my head trying to figure out why this wasn't working on the simulator. I wish Apple would allow full development using the simulator for all operations. – Christopher Wade Cantley Feb 04 '15 at 17:19
  • There is also a report the deleting and reinstalling one developer test app allowed other developer test apps (not deleted) to re-install from Xcode without the error message. – hotpaw2 Feb 05 '15 at 15:58
  • 1
    One random guess is that any old installation of the app is leaving something (undocumented by Apple) behind that a newer 8.1+ checksum or code-signing method doesn't like, thus thinks the new installation is corrupt. Deleting the old app(s) gets rid of whatever it was that was left behind. – hotpaw2 Apr 02 '15 at 19:44
  • This happened to me after I generated new certificates/provisioning profiles. So I'm guessing it's related to that (and yes, deleting the old app fixed it). – DBD Apr 03 '15 at 14:03
  • This happened because I had an App Store version of the app instalaled. – quantumpotato Apr 05 '15 at 17:48
  • Worked for me. iOS 10.10.3. My provisioning profile had just expired, and I also had to delete it. But deleting the app allowed it to be reinstalled. – some ideas Apr 17 '15 at 03:14
  • Lol at "the problem was due to 'the phase of the moon'". Anyways, delete and reinstall worked for me. – tboyce12 Apr 18 '15 at 00:25
  • What if deleting an app is not an option (f.ex: I have some files in the Documents or Caches folder, I would like to debug)? – Lukasz Apr 29 '15 at 08:43
  • 1
    If there are files you need to save, you can use Xcode to download your app's Document Container before deleting the app. See: http://stackoverflow.com/questions/25937785/how-to-download-app-data-in-xcode-6 – hotpaw2 May 23 '15 at 06:38
  • Note: This problem is NOT a rubymotion issue, as it occurs for apps and iOS developers who do not use rubymotion. – hotpaw2 May 23 '15 at 16:07
  • 3
    The app didn't install. How can you remove it? How can this be considered a valid answer? – BTRUE Jun 01 '15 at 17:53
  • The copy of the app that I had on my device was downloaded from the App Store. Deleted it and installed again from Xcode by running the app on the device and the error was not displayed. – Vishal Chaudhry Jun 25 '15 at 09:07
  • I got this error after updating certificates on the dev portal. Recreated profiles, updated XCode and no luck. Uninstalled app and everything worked. – CodeBender Jul 17 '15 at 06:18
  • Doing this on an iOS device fixed an `Installation Failed: Invalid Argument` error I was getting on the simulator. – akiraspeirs Aug 13 '15 at 06:32
119

As I notice The application could not be verified. raise up because in your device there is already an app installed with the same bundle identifier.

I got this issue because in my device there is my app that download from App store. and i test its update Version from Xcode. And i used same identifier that is live app and my development testing app. So i just remove app-store Live app from my device and this error going to be fix.

János
  • 32,867
  • 38
  • 193
  • 353
Nitin Gohel
  • 49,482
  • 17
  • 105
  • 144
  • 2
    Thank you! In my case I downloaded the app from apple store but later wanted to build it from source and profile on device. – Valentin Simonov Jun 10 '15 at 11:56
  • 1
    This worked for me.. had to delete the app which was already installed. – sach Jun 11 '15 at 09:52
  • 16
    Yup, this worked for me aswell. Seriously, this annoys the hell out of me. Each year Apple proudly announces how wonderful its latest bodge of Xcode is, but it still produces the most unuseful messages of any development environment. "Application could not be verified." How the heck is that sentence linked to "You've already got an App Store version of this app installed on your device." Hopeless. Grrrr... – Mike Gledhill Jul 06 '15 at 07:04
  • yeah mine was fixed by deleting a previous build from the phone. xcode's messages are crap. – Randy L Aug 24 '15 at 17:24
  • 2
    Deleting it doesn't help to test the 'upgrade' app path – bandejapaisa Sep 23 '15 at 09:49
  • Thanks. I deleted the app (with the same bundle identifier) downloaded from the AppStore, and now it worked. :) – KarenAnne Apr 20 '16 at 09:37
56

just delete the app and try again, it happens to me when i try to launch over a device that has the same app but generated by an ipa file.

Jorge Balleza
  • 897
  • 7
  • 10
27

You probably used the "Fix Issue" option in Xcode when plugging in a new device. Old question but I believe this is the actual answer to WHY this is happening. When you install an app on a device it is signed with a specific development provisioning profile. If, for instance, you plug in another device that is not registered on your developer account Xcode will ask you to "fix the issue". When you press that the device is added and another provisioning profile is created/modified. If you try to overwrite an existing app you'll receive that error. Deleting the app and reinstalling it works since the profile has been altered. I find this often happens when a Team is set and a member plugs in a new device then Xcode "Fixes" the problem.

Mark McCorkle
  • 9,349
  • 2
  • 32
  • 42
  • 2
    it's not always related to new devices, it can also occur if you switch the "Team" in the General > Identity section of Xcode. Even though the "Fix Issue" prompt showed for me, I used this phone before with my dev account, so it must have been from changing the dev account in my case. – whyoz Jun 15 '15 at 18:58
  • 1
    This may happen if "Keychain sharing" entitlement was enabled. – Kof Jul 07 '15 at 08:11
  • 1
    It happend to me after enabling iCloud in Capabilities. A related "Fix issue" created a new entitlement, which could be the exact cause. Deleting and reinstalling the app helped. – Greg Oct 22 '15 at 18:28
12

Might have figured it out... Deleting the app from the device worked for me, as others mentioned before (thanks!).

I think the reason is that the app on the device was actually signed with a separate provisioning profile, specifically a distribution profile in my case.

Morieris
  • 171
  • 5
7

I faced this issue a lot. I am not sure if this is the issue, but I think, when xCode saw that there is an app with the same bundle identifier as of the app, I am trying to install, it didn't allow me. So, I had to delete the older one and attempted to install and it worked. However sometimes for testing purpose, I needed multiple version of the same app and in that case, I would change the bundle identifier and try to install. It only works if, I am using an wildcard provisioning profile.

Natasha
  • 6,651
  • 3
  • 36
  • 58
7

To others not using RubyMotion and don't think that deleting the app is acceptable (as in, you want to do upgrade testing). Check out the bottom of these docs from Apple:

https://developer.apple.com/library/ios/technotes/tn2319/_index.html

It looks like they changed something in 8.1.3 to check for this new rule.

The Fix

"[Add] the installed application’s application-identifier value, as logged in the second parentheses, to the previous-application-identifiers entitlement’s array value for the app being installed (by resigning it or re-building it) and requesting new special provisioning profiles as shown below."

<key>previous-application-identifiers</key>
<array>
    <string>{Your Old App ID Prefix}.YourApp.Bundle.ID</string>
</array>

EDIT:

In order to do this, you need special provisioning profiles. You can request these from Apple: "To enable signing with the previous-application-identifiers entitlement new special provisioning profiles are required that can be obtained by going to the Contact US page and requesting them." (from the docs linked above).

plivesey
  • 2,337
  • 1
  • 16
  • 18
  • This should be accepted answer, as deleting an app is not really solution, but work-around. – Lukasz Apr 29 '15 at 08:45
  • can you explain in brief where do we need change ? I am having same issue. – Maulik May 25 '15 at 13:04
  • I'm no expert on this, but I think it's just a new security feature that apple has added to the os. It sort of makes sense that you shouldn't be able to override an application with a different bundle-id, but they realized it would be needed for testing so included this workaround. Sadly, since it involves contacting apple, I don't think the workaround is good enough from apple... – plivesey May 26 '15 at 14:24
  • From our perspective, it's basically just another requirement for upgrade testing. – plivesey May 26 '15 at 14:25
  • @plivesey It was also crucial for me to be able to do this without deleting the app (plenty of valuable testing data, etc...) and found even simpler solution: http://stackoverflow.com/a/30617406/229229 – Lukasz Jun 03 '15 at 10:45
  • Interesting, and good to know. Sadly for us, we can't rely on itunesConnect since it's way too slow to get builds approved. But definitely a simpler solution if you're ok with the wait time. And certainly faster than waiting to get special provisioning profiles for the first time. – plivesey Jun 03 '15 at 21:23
5

Had the same issue on my iPad running 8.1.3 Deleting the app and installing again fixed the issue. I use two different provisioning profiles on two different machines and that could have caused this issue.

4

Working & tested solution, which does not require to delete application:

It looks like AppStore Distribution Provisioning Profile or just iOS Distribution certificate have special permissions and "Could not be verified..." problem does not apply to them. They will always override previous certificate.

In other words: AppStore release will install successfully, even if already installed (testing, adhoc or enterprise) app has been signed by the certificate from different team.

If you are lucky and have previously uploaded app to the AppStore account owned by the same team as in certificate you have a problem with - then things are very simple: just download & install app from AppStore.

When it installs - app certificate will be the same as the one you want to test with and problem goes away.

If your app is not on the AppStore yet - iTunesConnect beta comes to the rescue:

Disclaimer: I did not tested this but since cert an prev are the same as AppStore release, I bet it works:

  1. Archive your app with AppStore provisioning profile (iOS Distribution cert) and upload to iTunesConnect (to the account owned by the same developer team as included in the provisioning profile not you want to run).
  2. Invite person with the device you want to run on (yourself?) to beta test.
  3. Download & install the app from iTunes connect beta.
  4. Now you are able to install your testing version.
Lukasz
  • 19,816
  • 17
  • 83
  • 139
3

The application could not be verified" , in your device there could be already an app installed with the same bundle identifier.

So Simple solution Just delete the App & try again.. ....

Ash
  • 5,525
  • 1
  • 40
  • 34
2

TL;DR answer - There is no real solution besides "delete app and reinstall".

This answer is not satisfactory for many situations, when you have an existing database that needs to not get deleted within the app.

Lukasz and plivesey are the only ones with solutions that don't require delete, but neither worked for me.

jeremywhuff
  • 2,911
  • 3
  • 29
  • 33
1

I resolved this issue by changing the Build System to legacy in xcode.

I had the same problem but the mentioned solutions above didn't work for me. Even I had no previous app on device, I got this error when deploying on my device.

How to do:

Simply, go to menu File > Project Setting, inside Share Project Settings, change Build System from "New Build System (default)" to "Lagacy Build System".

mehdi
  • 461
  • 1
  • 4
  • 13
0

I also encountered the same issue. Deleting the app didn't work, but when I tried deleting another app which was the current one's 'parent'(I copied the whole project from the previous app, modified some urls and images, then I clicked 'Run' and saw the unhappy 'could not be verified' dialog). Seems the issue is related to provisioning and code signing and/or some configurations of the project. Very tricky.

longbow
  • 362
  • 2
  • 14
0

I had changed the team but I forgot to change it in my Tests target it so it caused that. Maybe this helps someone.

akcoban
  • 953
  • 7
  • 14
0

Just had the same problem and I found out that the issue is with expired certificate. My app was distributed (AdHoc) through firebase and few days ago app was working just fine. Today I've realized that I can't install it because 'The application could not be verified'.

Finally I realized that certificate that I was using for app signing has expired 2 days ago. You need to upload it again and you'll be able to install it.

zvjerka24
  • 1,772
  • 1
  • 21
  • 27
0

I had the same problem. But, I realised I was using a single plist with (debug) and (release) configuration, like this.

enter image description here

So, I changed few things..

  • Keeping a separate scheme for (release).
  • I added a new scheme for development purposes.
  • Edited the new scheme > run > Build Configuration > and set it to (release)
  • Generated a new archive using the new scheme and voila!!.. I'm able to install on all my devices.

enter image description here

Sanjeevcn
  • 441
  • 7
  • 10
0

My case:

  • jailbreak'ed iPhone

Final solution:

  • Install tweak AppSync Unified via Cydia
    • to bypass signing/certificate verification
crifan
  • 12,947
  • 1
  • 71
  • 56
0

Same issue occurred for me when I was installing through link. I tried to install using different link. Then I could install the app.

Narasimha Nallamsetty
  • 1,215
  • 14
  • 16