LucasKarlsson
LucasKarlsson

Reputation: 1039

Install claimed to have succeeded, but application could not be found on device

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?

Upvotes: 84

Views: 41890

Answers (30)

mfaani
mfaani

Reputation: 36287

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

Upvotes: 0

Pavel Nikolaev
Pavel Nikolaev

Reputation: 109

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.

Upvotes: 9

Ankit J
Ankit J

Reputation: 224

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.

Upvotes: 1

glyvox
glyvox

Reputation: 58049

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.

Upvotes: 0

Ankit Sharma
Ankit Sharma

Reputation: 261

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

Upvotes: 0

Jaydeep Patel
Jaydeep Patel

Reputation: 1739

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

Upvotes: 0

Saranjith
Saranjith

Reputation: 11567

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.

Upvotes: 0

benchuk
benchuk

Reputation: 689

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).

Upvotes: 3

Anshul Jain
Anshul Jain

Reputation: 41

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

Upvotes: 2

Jeremy Huddleston Sequoia
Jeremy Huddleston Sequoia

Reputation: 23623

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.

Upvotes: 1

Pallav Trivedi
Pallav Trivedi

Reputation: 326

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.

Upvotes: 4

Poyan
Poyan

Reputation: 6643

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.

Upvotes: 0

codaman
codaman

Reputation: 226

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

Upvotes: 1

CodeReaper
CodeReaper

Reputation: 6145

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

Upvotes: 1

LandonHughesDeveloper
LandonHughesDeveloper

Reputation: 41

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.

Upvotes: 4

tong wu
tong wu

Reputation: 1

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.

Upvotes: -2

Andrey Gordeev
Andrey Gordeev

Reputation: 32459

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

Upvotes: 3

Asccort
Asccort

Reputation: 51

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)

Upvotes: 2

Jim Tierney
Jim Tierney

Reputation: 4105

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.

Upvotes: 0

Lal Krishna
Lal Krishna

Reputation: 16160

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

Upvotes: 0

EldenChris
EldenChris

Reputation: 1059

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.

Upvotes: 5

Senocico Stelian
Senocico Stelian

Reputation: 1697

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 🥳

Upvotes: 6

Patrick
Patrick

Reputation: 612

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.

Upvotes: 0

Rob Hogan
Rob Hogan

Reputation: 2634

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

Upvotes: 2

CMash
CMash

Reputation: 2168

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.

Upvotes: 0

Kedar Sukerkar
Kedar Sukerkar

Reputation: 1565

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

Upvotes: 8

Daniil Korotin
Daniil Korotin

Reputation: 730

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.

Upvotes: 2

Sachin Nautiyal
Sachin Nautiyal

Reputation: 588

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.

Upvotes: -1

mochasoft
mochasoft

Reputation: 391

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)

Upvotes: 0

Peter Shaburov
Peter Shaburov

Reputation: 1617

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

Upvotes: 2

Related Questions