Xcode displays error when trying to run app without uninstall from simulator (multi configuration files) - ios

Xcode displays this error every time i run the app on simulator , he forces me to uninstall the app first before every run .
i have 3 .xcconfig files on this project , Is the problem can be related to this? because all other projects are running fine without uninstall.
Xcode is Version 12.0.1 (12A7300)

Try going to Window>Devices and then click simulators. This shows a list of all your simulators. Delete any duplicates.
After that I would look for anything that stands out in your info.plist and in your project under "Build Settings" or "Signing and Capabilities".
These might also help:
iOS simulator: could not hardlink copy. Wrong path in my filesystem?
https://developer.apple.com/forums/thread/67294

Related

Problem with running IOS simulator for my flutter app

I'm trying to run my flutter app on the IOS simulator and its not working. So tried on the most basic flutter app (create my_app and then tried to run it) and nothing seem to work!
Everything seems to work fine when I run it from the terminal until the linking and signing phase and that where I get the error, how can I fix it?
This is the error I get:
Unable to install
/Users/MyUserName/Desktop/my_app/build/ios/iphonesimulator/Runner.app on
82562E3A-E7BD-4FE0-9BF9-8BB9C7AD5F15. This is sometimes caused by a malformed
plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command
(domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Could not install at this time.
Failed to transfer ownership of path
/Users/MyUserName/Library/Developer/CoreSimulator/Devices/82562E3A-E7BD-4FE0-9BF9-8B
B9C7AD5F15/data/Containers/Shared/SystemGroup/systemgroup.com.apple.installcoord
inationd/Library/InstallCoordination/PromiseStaging/98CD703F-760F-4AAE-B991-BC2E
82D37D17/my_app.app to installd
Underlying error (domain=MIInstallerErrorDomain, code=103):
Failed to transfer ownership of path
/Users/MyUserName/Library/Developer/CoreSimulator/Devices/82562E3A-E7BD-4FE0-9BF9-8
BB9C7AD5F15/data/Containers/Shared/SystemGroup/systemgroup.com.apple.installcoo
rdinationd/Library/InstallCoordination/PromiseStaging/98CD703F-760F-4AAE-B991-B
C2E82D37D17/my_app.app to installd
Command: /usr/bin/xcrun simctl install 82562E3A-E7BD-4FE0-9BF9-8BB9C7AD5F15
/Users/MyUserName/Desktop/my_app/build/ios/iphonesimulator/Runner.app
Error launching application on iPhone 11 Pro Max.
Edit:
I updated my MacOS, Deeleted and reinstalled Xcode, I even tried to run the most simple swift app and I get always this same error, it looks like the build was successful but it unable to install. I still get this same error, what can I do?
This occurred when I opened the Simulator first and then updated XCode -- even without running the app until after XCode updated completely.
What worked for me:
Close Simulator completely (from the dock, right-click -> "Quit")
Close XCode (if applicable)
Run flutter clean
Re-open Simulator
Re-open XCode and let it compile
Run the app again
If it still does not work, try resetting the device at "Device" -> "Erase All Content and Settings..." from the Simulator menu.
I had the same issue a couple of days ago
What I did - and what fixed the problem - was to reset the simulator (Device -> Erase All Content and Settings), and then run $ flutter clean
You should now be able to run your app again
None of the above worked for me. I created another flutter application and copied it's ios folder to my project. Worked like a charm
Save time, just go to erase device content and settings from the emulator, then run flutter clean. App should run fine then.
Run flutter clean and then run your app again
If error persist, generate a new flutter project on Android studio. Replace the ${projectHome}/ios/Runner.xcodeproj folder with the ${newFlutterProjectHome}/iOS/Runner.xcodeproj. Your app should run fine now.
If error persist still, delete the ios folder and replace it with a new one copied from a freshly generated project.
This happens if the GoogleService-Info.plist is missing.
This also happens when you have updated your XCode and your simulator is in the background.
Close the simulator and open the Xcode, you will get an option to install additional tools, install them and then run the application.
An alternate solution is to run the Runner.xcworkspace app once from Xcode and this may fix it.
In my case it was because of hanging empty GoogleService-Info.plist file inside Xcode after migrating to new Firebase (FlutterFire) initialization.
Xcode is not a regular drag and drop IDE which directly maps project files to the ones in the file system. It rather caches file references. So even when you delete a .plist file, the Xcode still maintains a reference to it.
Simply opened Xcode IDE and removed .plist file (which updated project.pbxproj in turn). This helped me to compile the project fine.
I had this same issue recently. I found out I added my GoogleService-info.plist file to the subdirectory Runner and not the main Project directory Runner through xcode. I opened up xcode again, deleted the file and re-added it to the proper place and now everything is working correctly.
for this you have to give some value in CfBundleVersionShortString like
<key>CFBundleShortVersionString</key>
<string>1.0</string>
And Give the build value in Runner as 1.0 and version as 1.0
enter image description here
To be honest. it's really frustrating for the developers
This is how I fixed!
flutter clean
flutter pub get
go to ios folder
rm Podfile.lock
pod repo update
pod install
Then it works!

This iPhone 6 is running iOS 12.4.1 (16G102), which may not be supported by this version of Xcode

Getting the error
This iPhone 6 is running iOS 12.4.1 (16G102), which may not be
supported by this version of Xcode.
while trying to run the app on iPhone after updating the iPhone.
I know that I can update the Xcode and System both and the issue will be resolved but I want to be able to install the apps on iPhone without updating the Xcode and MacOS.
Please help.
Tried nothing yet.
Can not share the code. No code to show here.
Issue:
This iPhone 6 is running iOS 12.4.1 (16G102), which may not be supported by this version of Xcode.
Resolution:
a). If the issue is not replicated on your another device with latest Xcode version
We need to add the support files in the Xcode. The files can be found on a system with latest Xcode on the path -
Go to Applications.
Right click on Xcode, click on "Show Package Contents".
Go to Contents -> Developer -> Platforms -> iPhoneOS.platforms -> DeviceSupport
Copy support files for the iPhone version.
Paste the file into the system in which you are facing the issue in same path as of above. Close the Xcode and run the code again to refresh the files.
b). If you don't have a system with latest Xcode.
Download the file "iOS 12.4 Developer Disk Image" from the https://github.com/xushuduo/Xcode-iOS-Developer-Disk-Image/releases and unzip the file. Rename the folder to "12.4.1 (16G102)" and paste the file into the system in which you are facing the issue in below path:
Go to Applications.
Right click on Xcode, click on "Show Package Contents".
Go to Contents -> Developer -> Platforms -> iPhoneOS.platforms -> DeviceSupport
Close the Xcode and run the code again to refresh the files.
You need to add device support files from this link
Follow these steps to add device support files
Go into Application and right click on Xcode.app then click on show package contents
Go into this path Contents/Developer/Platforms/iPhoneOS.platform/DeviceS‌​upport/
Get device support file 12.4 from attached link. Unzip it and rename to 12.4.1(16G102) and paste renamed file to above path under device support.
Restart Xcode and then run application on device.
Happy Coding..
I got the same problem. I tried several things but the only solution is to update your Xcode to 11.3.1. After the update I tried to run on my iPhone and worked perfectly!

Failed to chmod user/Library/Developer/CoreSimulator/Devices NO Such File Or directory

When i try to run my app in iPhone 6 simulator, i am getting following error. I am using Xcode 8.1 can any one please help me to understand this issue
I had this issue, where it would run it every time I deleted the app from the simulator, but when I tried to run it second time this error would show.
I solved it by resetting the iOS Simulator from the top bar menu.
Xcode 9.0:
Hardware → Erase All Content and Settings...
Pre Xcode 9.0:
Simulator → Reset Content and Settings...
I solved this with restart iOS Simulator: Hardware -> Reboot.
You can also solve this issue by just rebooting your simulator. there is no need to reset the simulator.
i have same problem and i have solved it by just rebooting simulator.
Check the Schema name and Executable file name in plistfile. both should be same.
I had this problem with an app that contained an embedded Sticker extension.
To work around it I first installed the app without the Sticker extension, I did this by clicking the Sticker.appex in the Products group and removing the app 'Target Membership' using the Inspector panel.
Once the app was installed, I could re-toggle the target membership and install the app with the Sticker extension.
SOLVED
I'd added ios platform with sudo. That why it happened. Now I do it without sudo, it works well.
Please follow below steps to fix it:
Remove platform (with sudo)
$ sudo ionic cordova platform rm ios
Add platform (without sudo)
$ ionic cordova platform add ios
Emulate
$ ionic cordova run ios
Please check for more info:
https://github.com/ionic-team/ionic/issues/4052#issuecomment-352999643
For solving this issue, U need to go for trial n Error. This error generally appears when you directly delete a file but missed to delete its mapping.
So to resolve this, verify all the mappings in 'AddedLib', 'Resources', and 'complied Resources' sec etc.

Simulator not working and showing the error message "Unable to boot the iOS Simulator" [duplicate]

I recently installed the beta of Xcode Version 6 in OS X Mavericks, with which comes the iOS simulator for iOS 8. I've managed to successfully run from Xcode 6 beta on a device with iOS 8 Beta, but opening the simulator always get the same error I have tried to change the hardware version of iPhone 4s, iPhone 5, ... in the simulator and still gives the same error: "Unable to boot the iOS Simulator".
I'm working with Xcode 5.1 at the same time in Mavericks, any suggestion to solve this? Is a possible problem for run this simulator in Mavericks because is only for OS X 10.10? Thanks.
After I found some solutions on the web, a combination of procedures worked for me:
Close Xcode and iOS Simulator (and all related applications)
Install (or reinstall) Xcode6-Beta to Applications folder (direct from the .dmg file)
Open Xcode6-Beta and go to Xcode -> Preferences -> Locations -> Command Line Tools and select "Xcode 6.0" (be sure that you've selected the one in Applications folder)
Launch the iOS Simulator and go to iOS Simulator -> Reset Content and Settings...
Close all the applications and restart your mac (I unchecked "Reopen windows...")
Open Xcode6-beta and test the iOS Simulator
Good luck
I also had this problem and found the solution by doing following steps:
Initially i downloaded Xcode 6 library in Documentation section under the path Xcode --> Preferences --> Downloads and restart my xcode but didn't solve my problem.
Downloaded and installed the iOS 7.1 Simulator under the path Xcode --> Preferences --> Downloads.
Restart xcode again and the problem solved.
I am facing same issue again next morning.
Unsetting the DYLD_INSERT_LIBRARIES variable solves my problem:-
Open terminal and type "sudo vi /etc/launchd.conf" command and press Enter
Press I "Insert" mode and change this
"setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
to this
"unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
and press esc to exit from insert mode.
Save changes by typing ":wq" Press Enter
Reboot your system and problem soloved.
Prior to that I didn't find any iOS version in front of each listed devices
but after installation or by unsetting DYLD_INSERT_LIBRARIES variable I found the same in front of each device.
I solved by removing and re-adding the simulators see screenshots here.
https://stackoverflow.com/a/25387715/1565615
I don't believe your issue is related to running Xcode 6 in Mavericks, as I encountered the same error on OS X 10.10.
After a bit of toying around with XCode and the iOS Simulator, the only fix I found was simply restarting the computer, and the error hasn't appeared since.
Try a reboot and then see if you can get things up and running.
(On a side note, after restarting just XCode (not the OS), I lost the option to run on the simulator at all—the reboot also fixed this problem, if anyone here encounters anything similar).
In Xcode go to the Xcode menu->Open Developer Tool - IOS Simulators. Choose simulator and then go hardware->device->manage device.
If the troubled device shows in the left column, delete it. Then add the device back from the '+' button. If it wasn't there in the first place, simply add it using the '+' button.
I had previously deleted ~/Library/Developer/CoreSimulator/ directory and the only command that worked for me is xcrun simctl erase all. Perhaps you might want to give this a try.
No need to download a new ios version. All you need is to go to About this Mac > Storage > Manage > Delete XCode Cache. And, it works for me
In latest OS version
About this Mac > Storage > Manage > Developer > select Xcode cache > Click delete button
I've faced same issue and solved by below steps:
1) Move xcode6-beta into application folder
2) Restart mac and open xcode6-beta from application folder.
i too had the same issue, but solved by installing the required simulators (Xcode > Preferences> downloads > install simulators)
This happened to me running the simulator on both Xcode 7 and 8 on El Capitan. The only thing that worked was disabling System Integrity Protection (https://apple.stackexchange.com/a/208481/86757).
I tested an awful quantity of solutions and the only one which worked for me was disabling root protection through Recovery Mode. I tested it with XCode 7.3, it's possible that this approach may work for XCode 8.
Reboot and hold the keys cmd + R prior to show the loading view with Apple Logo
When you are on Recovery Mode, go to Menu and choose Terminal
Type csrutil disable
Reboot the machine and run the simulator again.
I am adding this answer as it seems to be slightly different from the others.
Due to working on an older project I needed to download and run Xcode 7.3 and load the project in simulator - this yielded the "Unable to boot the iOS Simulator" error.
I completed all the above suggestions and none of them worked (reset simulator setting, restarted, deleted and reinstalled Xcode, reset the simulator location, restarted again etc)
In the end the issue was that I was trying to load the iPhone 5 (10.0) simulator on Xcode 7.3.
You can see here the Apple release notes for Xcode 7.3
Xcode 7.3 requires a Mac running OS X 10.11 or later.
Xcode 7.3 includes SDKs for iOS 9.3, watchOS 2.2, OS X version 10.11.4, and tvOS
9.2.
As you can see Xcode 7.3 doesn't include an SDK for iOS 10.0
This meant as soon as I loaded the simulator with iPhone 5 (9.3) it worked immediately.
I would therefore recommend when approaching this issue not to get railroaded (as I did) in thinking that something is wrong with the system before checking the basic things.
Note: It is also worth noting that the simulator must be configured to the Xcode version being used. This can be set in
Xcode -> Preferences -> Locations -> Command Line Tools
and also using the command line:
sudo xcode-select --switch /Applications/Xcode_7.3.app/Contents/Developer
*change the Xcode version to the new one you want to use
one of the reasons could be you might deleted /private folder.
you can try with following commands
sudo mkdir /private/tmp
sudo chmod 1777 /private/tmp
Following are the steps for solved above issue:
Search launchd.conf file in your mac
If not found then create from Terminal with help of command
~ user$ sudo touch /etc/launchd.conf
Terminal will ask you machine password
Then Open created file with help of command for EDIT, if terminal give you error as permission failed
~ user$ sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/launchd.conf
Open file manually from /etc/launchd.conf (Shift+cmd+g) and enter /etc/ (TextEdit software)
In file "DYLD_INSERT_LIBRARIES" flag replace with "ZZ" and save it.
Restart your machine.
Xcode will defiantly works.
This error indicates an error starting up launchd_sim when booting the simulated device. In and of itself, it does not indicate the actual cause. You can look in ~/Library/Logs/CoreSimulator/CoreSimulator.log for more information about the error (including the error reason).
Possible causes:
On OSX 10.9 and earlier, DYLD_INSERT_LIBRARIES could be set by 3rd party applications. On later versions, invalid DYLD_INSERT_LIBRARIES are ignored instead of resulting in an error.
Usage of older simulator runtime DLC with Xcode 7 betas. Newer versions of Xcode ignore these older DLC.
If you need additional help, please provide that additional datum.
Just check your simulator's iOS version. I fought with this error for 2 days and tried everything. Once I run the project on the simulator with iOS version that my Xcode supports, it worked sadly... :/
I quit everything and restarted the Mac. That's all. Its worked like charm!!
I don't know why, but this happened to me when I had Charles Proxy's throttling turned on.
I didn't have to run Xcode again or clean anything. Just disabling the throttling allowed the simulator to work again.
I also clicked on details, but this was all that I got:
Details
Unable to boot the Simulator. Domain: NSPOSIXErrorDomain
Code 60
Failure Reason: launchd failed to respond.
This might be related a known Xcode 11.2 issue:
Third party “endpoint security” software may cause slow simulators, system freezes, or prevent debug processes from running in simulators reliably. This sometimes manifests as debugserver disconnections or simulator applications receiving a SIGKILL signal. (55853555)
Workaround: Uninstall the third party software.
Though I was seeing this error on 11.1. Yet Apple may have just not realized this was an issue on 11.1 as well ¯_(ツ)_/¯
I have solved this issue using following steps:
Xcode -> Preferences -> Location -> Derived Data -> Delete your project folder.
I got this error on OS Catalina, Xcode 11.
I solved this by simply quiting simulator and Xcode, and then start Xcode and run your application.
1. Quit Xcode and Simulator if running.
2. Remove customised settings setup
defaults delete com.apple.Xcode
3. remove configuration folders
rm -rf ~/Library/Application\ Support/Xcode
4. Quit the terminal and run Xcode again.
Resetting the simulators fixed the issue for me. Run the below
Fastlane command to reset all simulators,
fastlane snapshot reset_simulators
Please ensure you have closed Xcode & simulator before running the command.
Fastlane is an Android & iOS deployment automation tool.
I just simply follow the below steps and the issue is resolved...
Go to About This Mac > Storage > Manage > Developer >
Select Xcode cache > Delete the cache
Now try to open the simulator again and it will work... In case if above steps did not work just try to do the same with s
Late answer, but it maybe helpful to someone. I tried all the solutions provided in this and related posts and neither of them worked.
I am using OSX(version 10.10.3) and Xcode 6.2. To fix this issue I followed the following steps :
Delete all xcode and simulator related files using AppCleaner.
Restart Mac.
Open Disk Utility app from applications.
In Disk Utility app; click on button Verify Disk Permission for your Macintosh HD (there will be some warnings displayed; I think /private/tmp is cause of this issue).
In Disk Utility app; click on button Repair Disk Permission for your Macintosh HD.
Re-install Xcode; now it should work.
More info : How to fix Xcode error ‘Unable to boot iOS Simulator’.
This may helpful
Open simulator with 4s
Click on menu- iOS simulator
Click on Reset content and settings...
Force close the simulator and run app.

XCode: App Won't Run on Simulator

I am trying to run the app that I am developing on the simulator but it just build the app but don't run it. Testing it on the device is ok.
I tired restarting both XCode and iMac, clean and clean build, but still won't run the app on the simulator.
How can I resolve this?
Please try resetting your simulator. It will work.
from top menu click "Simulator" -> "Reset contents and settings.."
Recently,i find out that if you have modified you /etc/hosts files and change 127.0.0.1 to another domain rather than localhost,XCode will fail to attatch the process on your simulator.
Restore you /etc/hosts file may fix your problem.
I followed the last answer by RockSuger on here app runs on device but won't run on simulator
I checked which version of Xcode I was running. Click: Xcode > About XCode My version was 9.2
In the project navigator I went to the blue project icon in the top of the upper left corner, clicked Deployment Info > Deployment Target and changed the old target from 9.1 to 9.2

Resources