I am also facing the same issue when migrating from Xcode 10.1 to Xcode 10.2.1, any solutions to it ?
As a workaround, following these steps seems to work:
- From your project's root directory run agvtool, giving it whichever version number you want: agvtool new-version -all 2
- From the Simulator choose Hardware > Erase All Content And Settings…
- Build and run your target again.
I've been having to repeat this process every time I want to switch between running the app in the simulator and executing unit tests, and sometimes when switching branches.
I should also note that this project uses an unsupported version pattern which looks like 3.2.1-1, which is probably the root of the problem. CFBundleVersion's documentation clearly states it requires a "…string composed of one to three period-separated integers, such as 10.14.1. The string can only contain numeric characters (0-9) and periods."
I don't understand why changing the CFBundleVersion to something like 2 doesn't resolve the issue entirely though. Or why these steps are necessary when swtiching between running and testing.
I have multiple Xcode versions , I did
sudo xcode-select -switch /Applications/Xcode_10.1.app
agvtool new-version -all 2
I see below error.
`xcrun: error: unable to find utility "avgtool", not a developer tool or in PATH`
I also see below error as well, I am on the project root dorectory..
There are no Xcode project files in this directory. agvtool needs a project to operate.
Hi , I was able to fix the issue by following below steps
The steps that finally fixed the problem and allowed me to install on simulator:
- Quit Xcode and iOS Simulator
/Library/Developer(the one from root), or rename it if you want to keep a backup
- Relaunch Xcode, agree with the installation of command line tools
- Continue work where you left over
Besides the steps mentioned in the question (fully uninstall Xcode 11, fully uninstall Xcode 10 and reinstall it afterwards), I also tried cloning the project in another location, circulating through all possible locations for derived data, installing other simulator runtimes and trying on those. None of them worked, luckily the console log app shown the path for the process that rejected the app bundle, it was one of the binaries installed by Xcode in
Seems that Xcode 11 installed a newer version of the frameworks, and Xcode 10 was not overwriting them. Removing the whole
/Library/Developerfolder triggered the command line tools installation, which finally brought back the simulator runtime that properly worked in Xcode 10.
just reset the simulator (Hardware > Erase all contents and settings)