84

Xcode gave me this message:

Could not locate installed application Install claimed to have succeeded, but application could not be found on device. bundleId = (null)

I just started using pods.

How do I fix this?

mfaani
  • 33,269
  • 19
  • 164
  • 293
LucasKarlsson
  • 1,021
  • 1
  • 10
  • 16
  • 2
    We've received a number of reports about this as radars over the past month. None of the reports contained a sysdiagnose from the host nor device. I've sent them all back to get data from originators, but so far, nobody has provided actionable data to investigate the bug. Can you please file a radar (use Feedback Assistant or goto bugreport.apple.com) and include a sysdiagnose from both the device and host mac? Thanks. – Jeremy Huddleston Sequoia Sep 16 '19 at 16:47
  • 1
    From answers below, it seems like these are issues in the apps being installed and the issue is that Xcode is thinking the app was installed when it actually failed to install. Indeed, there is much better error reporting when targeting the simulator, so I suggest doing that to uncover the actual problem. I'm still interested in figuring out why the device didn't report an installation problem, so please file a radar with the sysdiagnoses. Thanks. – Jeremy Huddleston Sequoia Sep 16 '19 at 16:50
  • @JeremyHuddlestonSequoia the same is happening with me and my team. I've just filed a radar. – Lio Sep 18 '19 at 18:46
  • 1
    Please let me know the FBA number. Thanks. Please be sure it includes sysdiagnoses from device and the histing mac. – Jeremy Huddleston Sequoia Sep 25 '19 at 13:45
  • 2
    I've also run into this on a React Native app I maintain. I was able to successfully install the app on the simulator, but this error pops up each time I try to run on a device. – Steve Gattuso Sep 27 '19 at 14:08
  • 2
    I still have not gotten any radar about this which contains a device and host sysdiagnose. Please file a radar (or include these data in radars you file). – Jeremy Huddleston Sequoia Sep 28 '19 at 20:13
  • @JeremyHuddlestonSequoia please check out FB7347361 which includes sysdiagnose from host and (real) device (I can't reproduce the problem on a simulator) – Rob Hogan Oct 04 '19 at 14:00
  • ..but also see my answer here - I might've had the wrong provisioning profile selected – Rob Hogan Oct 04 '19 at 14:20
  • Thanks. Yeah, it seems the install is failing (and logging the failure to the device's system log, which you can monitor in Console), but the it is being reported to Xcode as a failure. – Jeremy Huddleston Sequoia Oct 05 '19 at 16:35
  • 1
    Installing to a simulator device might help reveal the failure since this problem is only impacting physical devices. If things just work in the sim, you will need to check the device's system log after the failure. – Jeremy Huddleston Sequoia Oct 05 '19 at 16:37
  • this issue could happen if build number is empty. – Saranjith Dec 11 '19 at 10:23
  • I ran into this issue because I was building with a releasee config into my physical device. See [here](https://stackoverflow.com/a/62432103/5175709) – mfaani Jun 17 '20 at 15:06

41 Answers41

61

I ran into the same issue while testing a Cordova app on iOS 13 via XCode 11 Beta 4. Building via the legacy system solved it (File > Workspace Settings... > Build System > Legacy Build System).

Hope it helps

rguerin
  • 2,068
  • 14
  • 29
  • 7
    I found this in File > Project Settings... > Shared Project Settings: > Build System – markdon Sep 23 '19 at 05:27
  • 1
    This worked for me. Even though I already knew this to be a thing I completely forgot because Xcode 11 now handles errors differently. And by that I mean the error is different than before for the same issue. – Victor Ramos Sep 25 '19 at 19:10
  • 3
    This did not work for me. I get the same error in both cases. – Saad Qureshi Oct 28 '19 at 12:43
  • This didn't work for me too. I'm using Xcode 11, under macOS 10.14.6, building to iOS 10.0 target, and trying install in a 10.3.4 iOS device. – eldes Jun 29 '20 at 22:29
29

I solved this problem doing tipical project clean steps:

  • Product -> Clean.
  • Window -> Projects -> Select your project and delete derived data.
  • Close XCode.
  • Reopen project.
Bisca
  • 6,380
  • 2
  • 19
  • 32
18

This is a code signing issue. Xcode 11 requires you to add the "Apple Development" certificate to your development provisioning profile that they automatically added to your certificates and profiles. Add that certificate to your profile, redownload your development profile and vwala.

Justin Haar
  • 219
  • 3
  • 5
  • This is true for Xcode 11 I had to edit my development profile on (https://developer.apple.com) and add certificates For use in Xcode 11 or later – wael Oct 22 '19 at 10:13
  • 1
    All above solutions were not worked for me. This is the only solution worked for me. Thanks @Justin Haar – gstream Oct 31 '19 at 18:03
  • For me it helped to select "Automatically manage signing" again and xcode added a developer certificate additionally to the distribution certificate – randomcontrol Nov 07 '19 at 17:42
15

In Xcode 11 beta 5, I had the same error. I couldn't install the app. I even uploaded the app to App Store Connect, then tried to install with TestFlight, but the app failed to install after being downloaded, very weird. No error from App Store Connect. I found the issue by running the app with the Simulator. After running the app on the Simulator, Xcode gave me a detailed error message. In my case, I had multiple frameworks with the same Bundle IDs.

Emma Labbé
  • 667
  • 7
  • 18
  • 3
    Same for me, working on **SiriKit Intents**. For some reason this keeps happening when you alter the `.intentdefinition` file it adds all BundleIDs to all extension's Info.plist files. Just checking that each one only appears one solved it for me... – thisIsTheFoxe Aug 16 '19 at 20:53
  • 2
    @thisIsTheFoxe How you checked the presence of multiple bundle ids in extension's info plist? Me too facing the same issue in Sirikit intents. – Aravind Mariappan Aug 23 '19 at 05:07
  • My issue was also with SiriKit Intents (Xcode 11 beta 7). Running it on Simulator gave the exact error: "Siri Intents in the WatchKit app are not a subset of the Siri Intents in the companion app com". – Mithil Jadhav Sep 02 '19 at 08:38
12

I had this same exact error, but none of the above solutions worked for me.

In my case, I am using a free Apple developer account and got this error after trying to install a 4th app. The install limit for free accounts is 3. I deleted one of the 3 apps I already had and the installation worked as expected.

Kamar Mack
  • 151
  • 1
  • 6
9

I got the same error:

Could not locate installed application Install claimed to have succeeded, but application could not be found on device. bundleId = (MY_BUNDLE_ID)" but with MY_BUNDLE_ID instead "null

I got this error after Xcode11 update

Solution:

My Project and ProjectTests had different developments team. Project had Owner Team, ProjectTests had Personal Team

And I had't opportunity to change team to owner's by Xcode interface. So I make it in build settings - just entered my team (automate manage certificates enabled too).

Yes, its look an error in Xcode UI (red label), but was able to install on real devices.

mfaani
  • 33,269
  • 19
  • 164
  • 293
Pavel Nikolaev
  • 109
  • 1
  • 2
8

In my case I was using Xcode 11 GM seed with iOS 13 beta, and I had code signing to manual (distribution) since the "Automatic" was failing. I had my team agent allow my user "Admin" role, went into the Apple Developer's portal and edited the "invalid" provisioning profiles to check the checkbox explicitly mentioning "Xcode 11". After I downloaded the profile my team agent put back my role to "member" and all went well.

Sasho
  • 3,532
  • 1
  • 31
  • 30
8

Xcode 11 (11a420a)

I faced a similar issue, tried all the above solutions(eg.changing to legacy, clean and build, etc.) ... but ultimately the solution was with the external framework I used, I solved this by changing the option to Embed & Sign from Embed without Signing ..... Not sure this might be Xcode issue

Kedar Sukerkar
  • 1,410
  • 1
  • 16
  • 22
6

CARTHAGE WORKING SOLUTION

  1. Go to Project General -> Frameworks, Libraries, and Embedded Content and change framework as Do Not Embed (in my case Alamofire.framework was the problem)

enter image description here

  1. Go to Build Phases, select + New Run Scrip Phase, insert /usr/local/bin/carthage copy-frameworksfor the script shell, and for the Input files add $(SRCROOT)/Carthage/Build/iOS/Alamofire.framework

enter image description here

Now it should work

Senocico Stelian
  • 1,378
  • 15
  • 23
5

I've solved the problem by ticking the "Automatically manage signing" in the "Signing & Capabilities" screen.

None of the other solutions listed here worked for me.

EldenChris
  • 1,059
  • 1
  • 10
  • 16
4

I had this happen to me just recently when I updated to Xcode 11; if you are testing on a device, go to "Build Settings", then change everything to "iOS Developer" under "Code Signing Identity". This SHOULD fix the issue. Then once you're ready to launch, make sure you have iOS Distribution set up.

4

I faced the same issue and my code was not having any of the issues mentioned in other answers (frameworks using same bundle identifiers, legacy system etc).

My solution was to install the app first as side load, and then running the app in normal way (Cmd+R).

First, make an IPA of your project (there are many ways to do this, I made it by compressing folder named Payload having app file. You may choose other ways, all you need is an IPA file).

Next, open devices and simulators (Cmd+Shift+2) in Xcode.

enter image description here

Now click on the small plus button (+) in the INSTALLED APPS section, and you would be asked to select the IPA. Select your IPA, and it will be installed on the device.

Now that an application of given bundle identifier is existing on the device, your run command would work as expected.

Simply hit Cmd+R, and your project would run on the device.

Pallav Trivedi
  • 316
  • 1
  • 15
3

In my case the issue was found using the console log going through the logs I cloud see an error from the installd process saying there was something wrong with my plist.info file. It did not say what exactly But fixing my plist file solved it. In my case I had 3 plist files (iPhone, watch, and watch extension), the problem was my watch plist.info file (I added the NSLocationAlwaysUsageDescription accidentally, removing this solved the problem).

logoff
  • 3,347
  • 5
  • 41
  • 58
benchuk
  • 669
  • 7
  • 13
  • This helped me to find the problematic framework. Found entry in Console where `installd` printed `Failed to verify code signature of .../raygun4apple.framework : 0xe8008015 (A valid provisioning profile for this executable was not found.)`. Once I selected "Embed & Sign" for raygun4apple, everything worked great. – uson1x Oct 24 '19 at 13:47
  • 1
    I had a similar issue, but my Info.plist in my WatchKit Extension was missing the `CFBundleVersion` string. It was empty for some reason. I found the actual error in the Console logs from the iPhone itself. But Xcode 11 just kept spewing out that it couldn't find the app after multiple tries. – Tap Forms Oct 31 '19 at 07:02
  • 1
    This was my issue, I added a key to the watch info.plist accidentally. Thanks benchuk. – danfordham Nov 06 '19 at 00:36
3

It was a code signing issue in my case (I use manual code signing). I had to switch from iOS Distribution to iOS Developer for Any iOS SDK key:

Code signing issue

and also select an eligible development provisioning profile.

Xcode 11

Andrey Gordeev
  • 30,606
  • 13
  • 135
  • 162
2

For IOS 13 when installing the app with Xcode-beta the only thing that worked was to restart the phone connected to the computer

2

Fixed mine. Was caused by Alamofire framework (via Carthage) not being copied during build phase (used to be in Embedded libraries section in Xcode before, but it's gone now and choosing embedding type didn't work).

The script body is: /usr/local/bin/carthage copy-frameworks The paths are $(SRCROOT)/Carthage/Build/iOS/Alamofire.framework for input files and $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Alamofire.framework for output ones.

Hope this helps or lets you find your solution.

Daniil Korotin
  • 720
  • 3
  • 14
2

I was seeing this error with an "iPhone Distribution" provisioning profile / signing certificate selected - it cleared up when I switched to "iPhone Developer"

Rob Hogan
  • 2,442
  • 19
  • 23
2

I Finally found a fix (at least to me)

I was with facing this problem (that appears from nowhere) and maybe is some issue with the Dev/Production certificate. I have a Manual config on "signing & Capabilities" so when I switch to Automatic just fix the problem. (sorry for my bad english)

Asccort
  • 51
  • 2
2

Try this, this solution works for me. Enable Copy only when installing option under Embed App Extensions in BUILD Phases targer settings.

First try to Execute app on simulator, so that this will also throw some error on simulators too.

enter image description here

1

I encountered this issue and noticed this in the log:

-[MIBundle pluginKitBundlesSkippingPlatformValidation:withError:]: Ignoring plugin at (path to my app extension) because it doesn't work on this OS version

Updating the Deployment Target version in Build Settings for my extension fixed this.

masty
  • 1,539
  • 1
  • 17
  • 20
1

For me the issue was related to Alamofire library that was downloaded with Carthage. Ensure to select "Do not embed" and let Carthage to copy the Library.

codingspark
  • 99
  • 1
  • 2
1

I tried almost every single answer to this question before I noticed benchuk used the Console to figure out why he had a problem.

I had a look in the Console searching for installd and found that the "fat" Framework I had added to my project was actually signed.

The signature did not match the rest of the app which caused the installation to silently fail.

Knowing what was wrong, I could simply remove the signature:

codesign --remove-signature Some.framework

CodeReaper
  • 5,988
  • 3
  • 35
  • 56
1

It caused on my project because of Siri Extension. In "Build Phases" "Embed App Extension" remove xxxSiriExtension.appex build and add it again. It solved on my project

codaman
  • 206
  • 4
  • 6
1

This has been addressed in Xcode 11.2. With Xcode 11.2, you should now get an error that indicates that the app failed to install rather than an error that indicates that it installed but failed to launch. The error should also contain some details as to why the install failed. If the details are insufficient, I suggest targeting a simulator device instead of a real device as that should produce a higher fidelity error.

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
1

This happens when you are trying to run App on device using Provisioning Profiles for App Store. Make sure you are running using Development or Adhoc Profiles.

Another reason for this could , you could running some architecture stripping script for IPA generation. Check if this is throwing any errors.

Ankit J
  • 204
  • 2
  • 10
0

Very strangely, renaming the root folder of my project to something else did the trick for me. Probably some caching of xcode somewhere with the existing name of the folder was the reason.

coolVick
  • 538
  • 3
  • 7
  • 2
    that sounds like it could be a derived data issue, best to delete derived data rather than rename your project – Quinn Aug 09 '19 at 17:42
0

I had the same issue when I was working on a share extension. None of the suggested solutions here worked for me.

I cared for debugging and logging. I wasn't able to debug and/or log. I thought at first that the extension wasn't working, but ran a test and verified it was actually executing but for some reason I wasn't able to debug or log.

The best I was able to come up with is to manually attach a debugger, add breakpoints where I wanted to log, edited the breakpoints and added actions to log and continue after evaluation. The following is the steps to do so:

  1. Set the active scheme to the extension you want (from the top bar, or from Product/Scheme/Choose-Your-Scheme
  2. Debug/Attach to Process by ID or Name.... Then type the name of the extension or its bundle id.
  3. Add breakpoints where you wanted to add logs. Edit the breakpoint. Add action (Log Message) and enter the log you want. Check Automatically continue after evaluating the actions.

Here you can find my unanswered question.

joker
  • 3,416
  • 2
  • 34
  • 37
0

I fixed mine by going to Build Settings > Code Signing Identity > Debug. Make sure you have the appropriate "development certificate".

0

in the top of the Xcode window, next to run/stop click on your app icon, and select manage schemes. Make sure run and test uses the build configuration "Debug". Xcode changed these to "release". Do not ask me why! Using Xcode v 11 (11a420a)

mochasoft
  • 391
  • 1
  • 4
0

For me it was that I had a build phase script that was intended to strip simulator architectures from the app (for when it's published to the App Store).

I'd read a suggestion that building for the simulator would give better error details and found that the script was running on every build so I switched it to 'run script only when installing' and that seems to have resolved the issue for me.

CMash
  • 1,987
  • 22
  • 35
0

I also had this problem. If anyone couldn't solve it with another answer and uses a framework in his app, my solution:

I used a framework (tesseract), but didn't sign it, so I couldn't use the app, but Xcode didnt recognize the problem. To solve this, go to your project file, to general and change the "embed" option for your frameworks to embed&sign.

Patrick
  • 552
  • 5
  • 17
0

In my case, I just renamed Display Name from Something to something.

I'm forced to revert back to run on my device.

Config: Xcode 11.0, iOS 13.1.2

Lal Krishna
  • 15,485
  • 6
  • 64
  • 84
0

Solution #101 - Old instance needed deleted from device

Encountered this issue when running on my iOS 13 device, using Xcode 11.1, Mac OS recently updated to Catalina and expected it to have something to do with this.....but no.

Solution was much simpler....

I deleted a very old instance of the app from within the device, (long hold, press the x of course). Re-spun the build from XC and all worked fine!

Looks like there's various correct answers to this one, mine was this and may it help someone else.

Jim Tierney
  • 4,078
  • 3
  • 27
  • 48
0

I was getting a similar error when trying to install our app on device. We have recently switched teams for the app for various reasons, and apparently, some identifiers had not been changed.

  1. If this is the case for you, go to Apple Developer portal and find your team identifiers. They look something like this. NXD2KNAXM.

  2. Open your yourproject.xcodeproj/project.pbxproj file and simply search-replace the old identifier with the new identifier.

The approach is really ghetto, but it worked for me.

Poyan
  • 6,243
  • 6
  • 28
  • 30
0

XCode 11.1, Swift 5. Issue: Build Number was empty in XCode !!!

There could be multiple reasons behind this error.

For me it was because build number was empty in XCode. Check if the same happend for you.

Community
  • 1
  • 1
Saranjith
  • 11,242
  • 5
  • 69
  • 122
0

This question have so many upvoted answer as well but none worked for my case. For me i am not able to run in simulator or device.

I just deintegrate pod and install again and it's work. Clean the project and

pod deintegrate
pod install

Hope this will help some one

Jaydeep Patel
  • 1,699
  • 17
  • 30
0

Please check your all project target like projectnameTests signing in with same.account

Ankit Sharma
  • 251
  • 2
  • 9
0

I got this issue when I deleted an old instance of the app I was trying to run right before my build would've finished.

The solution is to simply build and run the project again.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
0

tl;dr You can NOT build from Xcode to your device with a App Store Distribution certificate. You can only install apps signed by Apple from TestFlight or App Store.


The reason is because that app built with distribution certificates can be installed on any device and that's a big no no for Apple.

I ran into this issue when I was purposely trying to test my release process from Xcode. I wanted to see if the provisioning profiles of my app extensions were having the correct entitlements, but turns out that's impossible from an architectural perspective.

What happens when you download an app from app store?

You just install it. No prompts to trust the developer team.

What happens when you install an app from Xcode (with your development or Enterprise Provisioning profile) or if you download it from your Enterprise Distribution Service (e.g. AppCenter) or some other service for delivering to Enterprise user?

You get a prompt that the developer team isn't trusted and you need to manually trust it:

enter image description here

So Apps signed with App store distribution certs don't prompt users with that message, hence Apple does NOT want to allow that ipa to be freely installed on every device and hack users information!

Also see another similar answers here and here

mfaani
  • 33,269
  • 19
  • 164
  • 293
  • very unrelated, but good to know about the affect of provisioning profile: https://developer.apple.com/forums/thread/119059 – mfaani Nov 03 '20 at 23:47
-1

For me it was updating Xcode project to the required upgrade, after updating it worked fine.

Just go to Issue Navigator (press command + 5) > look for missing project changes and update it.

I was running my code in Xcode 11 beta version, so there something got broken, after updating it to required settings it went back to normal.

Sachin Nautiyal
  • 568
  • 4
  • 15
-2

Try to change the frameworks target to 13.0 and Project Target to iOS 9.0

To fix it in my Xcode Version 11.0 for me the issue was frameworks target and project target.

denis_lor
  • 6,212
  • 4
  • 31
  • 55