Xcode tries to update itself again and again - xcode

I have a desktop Mac computer and I want to update my Xcode version:
So after click update button the system start to download the update (6GB) and when its finish i see the same window again instead of start the upgrade.
I try to restart the system, download the update again and this button is still show that i need to download the update.
Why my update did not start ?
Maybe the update file is still on my system and i can start the update manually ?

I had this problem with Xcode 10.2. This happens because the update wasn't successfully downloaded and you still have Xcode traces on your disk. I solved this by removing these files:
/Applications/Xcode.app
~/Library/Caches/com.apple.dt.Xcode
~/Library/Developer
~/Library/MobileDevice
~/Library/Preferences/com.apple.dt.Xcode.plist
/Library/Preferences/com.apple.dt.Xcode.plist
/System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.bom
/System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.plist
/System/Library/Receipts/com.apple.pkg.XcodeSystemResources.bom
/System/Library/Receipts/com.apple.pkg.XcodeSystemResources.plist
If you can't update Xcode from the Appstore app, then you should consider downloading the latest Xcode xip file from Apple's developer program site

Related

Flutter: XCode error "Unable to boot the Simulator"

Iam running the latest OSX/Flutter/XCode Versions using flutter, android studio and firebase and 1 hour ago everthing works perfectly.
Then i rebooted my macbook and when i try to launch an ios simulator i get this error "Unable to boot the simulator".
The following steps shows no solution:
Reinstall the ios simulator
Flutter clean and pub get
Updating comand line tools 13.3.1 (13E500a)
Run invalid cache of android studio
I found the problem also on stackoverflow but all sugestions does not working.
Any ideas?
Let me know if you need more information!
Thank you
NO NEED TO UNINSTALL XCODE! Though I know the contributor already has solved the issue, I'm happy if this answer will help someone else.
Go to [About this Mac > Storage > Manage > Developer]
Delete all the content (no worries!)
You can delete xcode cache and it will work,
by going to
About this Mac > Storage > Manage > Developer or any folder you choosed for development when installing xcode and flutter then Delete XCode Cache.
Step 1:
Go to About this Mac
Step 2:
Go to Storage
Step 3:
Delete all the content Or Delete XCode Cache
You can just clean your Xcode Caches, and that will do the trick,
About this Mac
Storage
Developer
XCode Caches
For me it was not necessary to delete XCode. I could solve it with this:
1: Click on "About this Mac" in the top left corner
2: Click on "Storage"-Tab
3: Click on "Manage"-Button
4: Click on "Developer"-Tab
5: Right click on all the data and "Delete"
For Mac Ventura 13.0 OS and higher -> Click apple logo on top left of your Mac
System Settings > search Storage > Developer
Then delete Xcode Caches
Product-> Clean Build Folder works for me!
After checking some other comments, it seems uninstalling XCode is not necessary.
The issue is not directly related to Flutter but it is related to the XCode 13.3.1 with the Simulator, specially for iPhone and iPad (tvOS and watchOS should have no issue so far).
Somehow the existing files during the security update causes the simulator to get corrupted.
As temporary workaround, you can try the following steps:
Uninstall XCode by moving from Applications folder to the Trash
Empty the Trash
Open the Mac Storage Management and go to the Developer in the sidebar
Delete everything from the Developer Section
Download Xcode 13.1 from Apple Developers and not the stable release from App Store
Extract the downloaded Xcode_13.1.xip file, i actually recommend via terminal by using xip -x Xcode_13.3.1.xip, and take in mind the extraction uses 100GB and it takes up to 2 hours to complete. You are going to have this message at the beggining xip: signing certificate was "Software Update" (validation not attempted), but you can ignore since this is expected.
Finally, move the extracted XCode file to the Applications folder
Run sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Run sudo xcodebuild -runFirstLaunch

i can't update Xcode

I have a macbook air and I went to the store to install Xcode 7.3 and hit the update App button, and a loading icon appeared but after waiting 30 min time nothing happened. I successfully installed simple recorder from the store but I can't install Xcode.
What can i do?
What are the options to download it?
Try restarting your computer to see if Xcode has installed. This will also refresh the app store, so try downloading it again.
If all else fails:
You should uninstall all current versions of Xcode on your Mac. Do this by dragging each application to the Trash can. Delete your trash.
After, try downloading Xcode again and everything should go through.
You aren't aloud to download old versions of Xcode from the App Store.
I suggest you to download the new XCode 8. It works just fine, even if your update button doesn't seem to work. Need to use the App Store. Also, if you happen to be a React Native developer, you may want to follow this article just after having installed this new XCode version.
If you simply cannot install the latest version, I suggest going to www.developer.apple.com and click the Develop Tab, Xcode, Download, sign in with your apple id, and get an Xcode beta version.
www.developer.apple.com -> Login -> Account -> Downloads
If only spinner is showing, without progress. Open Activity monitor and check if installd is running and using a lot of memory. Try killing that process and update again.

Unable to update to Xcode 8

I would like to update to Xcode 8, but when I start the App Store it just shows me an Open button, but my existing Version is 7.3.1
The requirements should be El Capitan 10.11.5 - I have 10.11.6 installed.
Why is there no Update button?
Check if you have multiple installations of Xcode on your system. The App Store often gets confused and loads one you're not considering, such as the version on your back up drive. It's possible it has updated a different installation than the one it launches as well.
Executing the following command in a terminal window should list all installations of Xcode the App Store may find.
mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"
When you have Xcode open (from hitting Open in the store), right click the Xcode icon on your dock, select Options, and Show in Finder. Does the installation it shows match up with the one you expected it to launch?
If you specifically open each Xcode installation the mdfind command found, are any of them Xcode 8?
You can control which installation of Xcode the App Store will update. Check each of the app folders, and look for a Contents/_MASReceipt folder. Ensure the installation you want to update has that (and a receipt file inside that), and delete the _MASReceipt folder for all of the other versions.
Now the App Store app should update the correct installation for you.
All I had to do was restart my mac. Then, went to the App Store and saw "Update" instead of "Open".

Storyboard Preview in Xcode force closes every time

Whenever I try to use the Storyboard Preview feature as part of the Preview Assistant Editor in Xcode, the whole program just force closes each time. However, there is nothing wrong with the code as it runs just fine in simulator.
The message I get simply states: "Xcode closed unexpectedly".
OS X Version: 10.11.6
Xcode version: 7.3.1
I have had the same problem and the only thing that solved it for me was to completely uninstall and remove Xcode and the to reinstall it again.
This is the stops you do to uninstall Xcode you need to remove:
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application\ Support/Xcode
~/Library/Developer/Xcode

Updating XCODE using different apple account

I have MAC OS 10.7.3. xcode 4.3.1 installed using different apple id as my macbook pro was used previously by my friend. Now when i try to upgrade Xcode to 4.3.2 it asking credentials for my friends account. Unfortunately App store clearly says you can upgrade an app using the account which was used to install the app.
How can i upgrade Xcode using my credentials?
Thanks in advance.
I am sure you would have solved this by now but just posting the solution here that worked for me..
Open Finder and navigate to Applications,
Ctrl+Click the application and choose "Show Package Contents" (Xcode in this case),
Expand the Contents directory and click the _MASReceipt directory to select it, Type Command+Delete to
delete the directory permanently---you will be prompted for your
credentials since this is a protected file.
Quit and restart
AppStore, then find the application. You can update with your new id now without deleting the old version of the app
Hope this helps someone coz it took me a while to figure out !!
Unfortunately had to answer my own question,
Simple Answer: NO, You cannot update xcode installed from another account.
Solution is to delete the existing installation and re-installing from new account.
To delete the existing installation, you need to delete it from Launch pad. You can do this by locating xcode icon in launch pad, long click on the icon till it starts dancing. Then delete it and wait for a while till the xcode.app is deleted from /Application. If you manually delete xcode.app from /Application, App store will continue to think its installed and will not allow you to reinstall in future.
Above solution is assuming you have installed xcode from the mac app store, usually versions later than 4.2. For earlier versions, just deleting /Application/xcode folder should work.
The solution is found:
I had this bug, it's related to Spotlight. The App Store used Spotlight in some way. My fix was to add the entire HD to the "Privacy" tab in the Spotlight System prefs pane, close the prefs and wait 30 seconds, re-open and remove your HD from the Privacy tab. Spolight begins reindexing. Re-opened the App Store and problem was fixed! Posting this here for others who might search later on. Also filed a bug report with Apple.
Source: https://discussions.apple.com/thread/2806858?start=0&tstart=0

Resources