Install claimed to have succeeded, but application could not be found on device Xcode 11 - ios13

Just after switching from Xcode 10 to 11, I am unable to install my app on any device
The error at launch time after installation succeeded says :
Install claimed to have succeeded, but application could not be found on device.
Details says :
Could not locate installed application
Domain: com.apple.platform.iphoneos
Code: -1
Recovery Suggestion: Install claimed to have succeeded, but application could not be found on device. bundleId = myBundleId
--
Installed application was not present in database of installed apps after multiple lookup attempts.
Domain: com.apple.platform.iphoneos
Code: -1
However everything works fine on a simulator.
I tried to delete derived data, clean project, delete the app ..
Very strange : After submitting the app to testlfight I can download it and it works.
But when I build a new app to Xcode it launch the app just downloaded from tesflight and not the version pushed via Xcode ..

For me, it's a problem with ipatool.
Here's a way to find out details why it failed to create a proper iPhone App (.ipa) file from the build output/Xcode archive:
Go to Product > Archive, then open Window > Organizer > Distribute App.
It should show you "IPA processing failed" with a big red error symbol.
Now, open the logs and search along these lines:
timestamp Assertion failed: Expected n archs in otool output:
and
timestamp /Path/to/ Xcode-beta.app/Contents/Developer/usr/bin/ipatool exited with 1
While this can't be the final solution, try removing all problematic libraries mentioned in the logs between the two lines until ipatool exists successfully.

I also had this issue/error message. I realized that I had automatic signing deactivated and I had selected a provisioning profil with a distribution certificate.
Solution:
So if you want to run the app on your iphone directly from Xcode (not through testflight) you have to make sure you use a provisioning profil with a developer certificate.

This is probably not the case for most people facing this issue, but I faced it once several days ago and easily dealt with it by cleaning the build folder and switching to a legacy build. The second time I faced it, none of the suggested solutions seemed to be working.
I then noticed that because I'd almost run out of storage on my device, iOS had "offloaded" almost all of my apps. If there is a small cloud under your apps and the app needs to "install" again before launching, then this is the case with your phone too. Trying to launch all of the apps that I don't use regularly (so I never noticed the little clouds) "reinstalled" all of them and solved the issue entirely. Maybe this helps someone facing this for similar reasons.

I have the same problem,I modify the project setting
File --> Workspace Setting --> Build System --> Legacy Build System
it's OK for me

I also got this alert. That's because i run the app in release Build Configuration, but with a appstore Provisioning Profile . It's not allowed. So i change the appstore Provisioning Profile to a dev Profile. Then everything is ok.
Hope this can help you.

I found a way to solve this problem. After I upgraded iOS 13.1, the real machine also ran. Later, I found out that because I had archive operation the day before, the real machine running certificate changed from distribution mode to development mode and everything worked normally.

For my case (xcode 11, ios 12.4), change the Bundle identifier can solve this issue...
Before changing Bundle id, I've tried
using beta xcode
deleting app on iphone
deleting derived data
cleaning project
reopen xcode

Here's another solution. I had previously installed three other apps using XCode and got this error message when I tried to install a fourth.
I simply deleted one of my three existing apps (after hours of hair pulling and SO searching) and tried again. It worked.
Platform: iPad 2018 on v13.1 with XCode v11.1,

I was using different signing team/certificate for ...Tests target.
Setting the same for main target helped.

Update pods if you have.
pod update
just it.

Related

Hot restart error with cannot copy ipa file

While I am aware that Hot Restart is in preview, it was for quite a while now and my testing never really worked since the first time I've tried it. I've waited for a few VS studio versions to come up, hoping that my issue will be fixed. Since I've kept an eye on issues and haven't seen something similar, I tend to believe that the issue is locally with my setup.
Here is the situation:
I've enabled Hot Restart in VS and added my account, picked the team (after I was added) and everything went fine without errors. I have a free apple account, but after I was added to a Team I was able to obtain automatic provisioning to work.
I've tried to set the debug build options similar to how the simulator was set
I've disabled device specific build as I saw in the docs that it can create problems.
I've installed iTunes just as specified in the docs and when I connect my device to my Windows 10 PC, I can select it from the list.
So basically it looks like everything is set up. I use for testing an iphone 7 with latest iOS version.
Here is what happens:
I've selected different types of output logs hopeing to catch some error in there that could lead me to find a solution.
when starting to build I can see "Building offline for a local device" and I can see my provisioning file details on "Detected signed identity"
I see no apparent error while it compiles and does its job, no complains about signing
then it gets to the IpaCopyToStagingDirectory and there it starts to copy a bunch of files from bin\Iphone\Debug to Artifacts\app.iOS.dSYM where I get the final error: Could not copy the file bin\iPhone\Debug\\app.iOS.ipa because it was not found
If I go to the bin folder, there are many files, including app.iOS.exe, but indeed there is no ipa file. I also don't know why it has two \ on its path.
Any ideas why is not working?

Why do I get this GRPC Error "WARNING: EmulatorService.cpp:448: Cannot find certfile" when I start the emulator?

Good evening everyone, I have only been dealing with Java and Android Studio for a few months, can someone help me to solve this error? It occurs every time the emulator starts. Thank you
Emulator: Started GRPC server at 127.0.0.1:8554
Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\Sawye.android\emulator-grpc.cer security will be disabled.
Invalidate and Restart option in Android Studio, followed by gradle clean, and manually uninstalling the application from the emulator finally worked for me. Individually, they didn't for whatever reason.
I tried several other options mentioned without any luck. The file it mentioned "emulator-grpc.cer" still doesnt exist anywhere. There is a keystore in that folder called debug.keystore which isn't altered after fixing it, so I'm guessing that error is just misleading about the real problem, whatever it is. Anyway, thought I'd share what worked for me since I searched everywhere for it and didn't find it.
A quick fix:
From the main navbar menu
Tools > Android > SDK Manager > Android SDK > SDK Tools
You'll then see the screen below where you can select '- Android Emulator Hypervisor Driver for AMD Processors (installer) version 1.3.0'
I am not sure what the actual root cause of the issue is, but this patched the issue for me and may help other people.
Here my scenario: I closed the emulator with force quit. After restarting emulator, I always got this error.
Fix: I opened the AVD Manager in Android Studio by selecting Tools > AVD Manager menu. In the opened popup, I chose Wipe Data option as can be seen below image. After that, I restarted emulator and it worked !!!
Your emulator is out of date, please update by launching Android Studio:
Start Android Studio
Select menu "Tools > Android > SDK Manager"
Click "SDK Tools" tab
Check "Android Emulator" checkbox
Click "OK"
Got the same issue, I restarted the computer and then runned again the emulator and it worked. Important! you have to run the app, not debug it. You can use debug after the app is installed again in the emulator
Unless it's preventing your app from running in the emulator, or preventing the emulator from running at all, I wouldn't worry about it. It's something new that Google put into the emulator so it now checks for that file. I looked at an installation which did not have the updates and the cert file was missing there as well, and it ran just fine with no error. I'm not sure what Google is doing, but I know that this wasn't thought through all the way based on the number of people who have been having problems with this.
I was also getting the same error. The above answers didn't fix my issue. I tried a lot of things, then finally when I uninstalled Intel x86 Emulator Accelerator (HAXM installer) from-
Tools > Android > SDK Manager > Android SDK > SDK Tools.
Then I reinstalled Intel x86 Emulator Accelerator (HAXM installer). This fixed my issue and I was able to run my emulator again. Hope it helps!
I have tried all the strange answers above nothing solved the issue. So searched in google's issue tracker, I found someone posted an Issue about it, and here is what the team wrote in response:
Hi, this warning is benign. We'll remove it in a future update.
So as google said: that warning is nothing to be worried, not harmful, and will be removed!
Update:
Issue was now indeed fixed with latest Release Update for the Canary Dev Channel:
Removed prints about certs and GRPC on startup.
You need to add credentials for your application in console.developers.google.com i.e. credentials, clik Api Key 1 and than ADD AN ITEM in Restrict usage to your Android apps.

iOS Xcode 10 How to fix broken "New build system" - build.db: database is locked Possibly there are two concurrent builds

I'm having problem with the infamous:
"/Users/n/Library/Developer/Xcode/DerivedData/Build/Intermediates/XCBuildData/build.db":
database is locked Possibly there are two concurrent builds running in
the same filesystem location
How do I fix broken "modern" build system getting stuck with a locked database?
I tried:
Cleaning the project
Deleting derived data
Updating cocoapods (sudo gem...) and pod install
Full nuking of Xcode folder with a fresh reinstall from App Store
Now I'm with a fresh Xcode installation, the project worked for a dozen builds(real device and simulator) and the problem comes back, making me unable to work on a project. How I can reset the locks on build.db or delete it?
I see this question asked multiple times, and the answers do not solve my problem. I'm not using build scripts, all I have is a couple cocoapods. Please do not close this question, as I'm asking specifically about lack of:
NO CUSTOM SCRIPTS
NO CONSOLE BUILDS
NO COMPOSITE TARGETS
The only thing that lets me continue working is turning to the legacy build system:
How can I use the legacy build system with Xcode 10's `xcodebuild`?
Xcode 10: unable to attach DB error
I encountered this when tinkering with cli, swift run democli. The error I got was:
unable to attach DB: error: accessing build database "/Users/xman/Desktop/democli/.build/x86_64-apple-macosx/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
I just remove the build.db, and the DB error is gone.
So far the only way to fix this is to turn the "Legacy Build system" on in File > Workspace settings. After certain number of computer restarts (or time elapsed?) the setting can be changed to the "new" build system again and it will build.
I managed to compile my project by adding to the xcodebuild command line:
OBJROOT="${OBJROOT}/DependentBuilds"
Thanks to this post: https://github.com/mattgallagher/CwlSignal/issues/24#issuecomment-396931001
I encountered the same issue while using Fastlane and the New Build System.
After switching from xcodebuild( ) to build_app( ), the issue was resolved.
The legacy build solution is too temporary. You can only use that from within XCode. You can't use it within VSCode, so you lose the Hot Reload sweetness.

/usr/bin/codesign failed with exit code 1 in Xcode 6.4 (yosemite 10.10.5) when trying to run on iPad

Everything started when I tried to create and validate my archive for the new app version.
My developer certificate expired, I revoked it (I didn't revoke distribution certificate it is still valid) and now it is up to date. I deleted my old associated provisioning profiled from Xcode and Xcode is configured to generate them automatically. After The provisioning profiles were not in my account. I was able to compile fine without errors using simulator, but I can not run app on my iPad. I deleted old app version (I could not find in iPad Settings->General any Profiles to delete since my version is iOS8.4 and it deletes it automatically) I don't know if I need to delete anything else on iPad?
Now when I try to run from Xcode app on iPad, I get this error:
Command /usr/bin/codesign failed with exit code 1
(see details below)
NOTE1: I don't get this error when I run it in the simulator, only when I chose to run on registered iPad
NOTE2: I was able to run app on this same iPad before I revoked the certificate.
NOTE3: I was able to create archive and submit the app before, problems started when certificates expired.
All troubles started after revoking the certificate.
I am running Xcode version 6.4
Mac has OS X Yosemite Version 10.10.5
Here is what I did so far:
After revoking certificates,I tried to delete provisioning profiles and restart Xcode, Mac and iPad and that didn't help.
I deleted old certificates from keychain, right now I have just the new up to date certificate in my keychain.
When I tried to run Xcode it asked me to fix non-existing provisioning profiles and it worked for simulator, but not for iPad.
I also looked in Xcode general settings for the build and tried various things, but that didn't help...
This didn't help too:
Xcode -> Preferences -> Accounts -> Choose your account, and then View Details -> Refresh (button on bottom left), Refresh again, restart Xcode
I tried to read developer guides for distribution, but troubleshooting suggestions how to run on development device didn't help, also I didn't find much about this codsign error.
I also downloaded new certificate WWDR from Apple, that didn't help.
I tried most of the things what people suggested related to this error posted, but didn't help...
One additional info:
My problem is also that I am trying to submit second version of the existing app, so I don't know what I can delete in order to be able to submit the updated version of my app again. If it was new project I would create new project from scratch and start from zero, but this happened just when I was ready to submit new archive...
Do you have any suggestion how to fix this issue, which steps to follow?
I would appreciate your pointers where to read or what to do.
If you need additional info from me, please let me know.
Thanking you in advance, -Tatjana
CodeSign /Users/t/Library/Developer/Xcode/DerivedData/K-eskcdowdkybtiygveputefcuziqr/Build/Products/Debug-iphoneos/K.app
cd /Users/t/Desktop/myProjects/K
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: T... (G....)"
Provisioning Profile: "iOS Team Provisioning Profile: com.k.K"
(5....)
/usr/bin/codesign --force --sign D.... --entitlements /Users/t/Library/Developer/Xcode/DerivedData/K-e.../Build/Intermediates/K.build/Debug-iphoneos/K.build/K.app.xcent /Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app
CSSM_SignData returned: 8001094A
/Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app: errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1

iOS Simulator failed to install the application

I have created a Cordova 2.1.0 app, It ran fine for the first 2-3 times. But now when I am trying to run it through terminal it is giving me the following error.I didn't change anything.
Ankurs-Mac-mini:~ ankur$ /Users/ankur/Desktop/CordovaSMS/cordova/emulate
Ankurs-Mac-mini:~ ankur$ 2012-10-17 16:11:08.695 ios-sim[7032:507] stderrPath:
/Users/ankur/Desktop/CordovaSMS/cordova/console.log
2012-10-17 16:11:08.698 ios-sim[7032:507] stdoutPath:
/Users/ankur/Desktop/CordovaSMS/cordova/console.log
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain
Code=1 "iOS Simulator failed to install the application." UserInfo=0x7fc643902320
{NSLocalizedDescription=iOS Simulator failed to install the application.,
DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
any help would be appreciated.
Thanks
Solved the problem
Deleting contents of ~/Library/Application Support/iPhone Simulator and re-run the project solved this problem.
or you can simply reset content and setting of the simulator.
Try manually launch the iOS Simulator and from the "iOS Simulator" menu, click "Reset content and settings", then close and rebuild your app.
My solution is:
From menu, iOS Simulator, Reset Content and Settings.
Close XCode 5.0: close project and close it from Dock and re-open the project and launch again, like in Windows :)
I tried everything mentioned above and nothing worked. My problem was iOS 7 specific. I was finally able to resolve the issue by assigning a non-empty value to Bundle versions string, short (CFBundleShortVersionString) in the -Info.plist file. Looks like iOS 7 doesn't like an empty value for the build number. I had a script that auto increments the bundle number by 1 every time I build the project so this field was empty. I just assigned a dummy value there to get it working.
You can also remove the app from the simulator.
This worked for me in iOS6.1
Solved here: https://stackoverflow.com/a/16279286/1927253
I copied a folder into XCode 4.6.2 with the name "Resources". When XCode asked, I created the folder references for any added folders.
Every time I did this, I would have to goto the Derived applications directory, and delete the build directory for my project to get it working again.
Solution: Do not copy a folder by reference into XCode with the name "Resources". Rename it to something else other than Resources.
Very annoying error.
just reset your simulator and re-run your project
Unfortunately none of these solutions solved my problem. I did everything, even restarting my mac but it was still failing. What actually did solve my problem was to go to the Organizer and delete the Derived Data and Snapshots.
Had the same problem after installing XCode 5. Had no iOS 6.1 Sim or SDK. Obtained these. Tried to run the App up under the iOS6.1 Sim and go the failed to install message. Having read through all of the above posts, I decided to simply remove the App from the Simulator and re-istall, re-run from the project window and that solved it for me.
I tried ALL these things and more including reinstalling Xcode 5 and nuking every xcode and simulator preference/application support file with no luck.
Then for the hell of it, I CHANGED my short bundle version string (it already had a value, it was not empty), and it fired right up.
3 hours gone but yeah
All the answers I looked for do not work for me!.
Finally
The only way to make it work is as follows
1.Check the version of titanium being used for the project in tiapp.xml
2.right click the prject in the project explorer window.
3.Select Properties
4.Choose project build path. Select Titanium Mobile SDk all versions of 3.* Tick all of them.
5.Now click apply and re run the project.
None of the above worked for me, I finally compared my info.plist to another project and found that I had somehow deleted the "Executable File = ${EXECUTABLE_NAME}" key/value pair, replacing it fixed the problem for me.
This error occurs on iOS 7.0 if you leave the "Build" empty.
Enter a build number!
What worked for me was to simply delete an old version of the app, which was made in a prior version of Xcode (likely 4, now running 5) from the simulator (tap-hold, jiggle, x).
I encountered this problem while trying to create a build for Facebook application approval. I found that for some reason, when I used the following command line:
xcodebuild -arch i386 -sdk iphonesimulator7.1 -scheme Mana -configuration Release
the files didn't end up in [project root]/build/... (as the instructions on Facebook suggest), but in ~/Library/Developer/Xcode/DerivedData/[app name + unique identifier]/Build/Products.
I'm not sure exactly what's going on here (anyone who knows more please enlighten me!) but I was able to run the files in the DerivedData directory on the simulator. Hopefully they'll also work for Facebook!
I tried everything mentioned above and nothing worked.
Finally the only way to make it work was unsetting DYLD_INSERT_LIBRARIES=/usr/lib/libimckit.dylib
How I did this:
Open terminal and typing "sudo vi /etc/launchd.conf"
Changing
"setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
to
"unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
Save changes
Reboot your system
In this post [1] explain what DYLD_INSERT_LIBRARIES is for
[1] https://stackoverflow.com/a/26053165/2091181
On Mavericks 10.9.5 using Xcode Version 6.0.1 (6A317) with an iOS SDK supporting 8.0 originally had Simulators all version 8 all getting this error. All the advice above was not working for me. So went to Xcode->Preferences->Downloads and saw as installable (but not yot installed) in the Components section were iOS Simulators 7.1 and/or 7.0. Went ahead and installed the 7.1 Simulators and got extra designations on the Product->Destination list Simulators of version 8.0 and 7.1, and using the 8.0 still had the same error, but the 7.1 Simulators all worked.

Resources