XCode won't update from App Store - xcode

This night I've update my iPhone which I use to test my applications but that caused a problem of "Developer Disk Image", which, as I understood, basically means that Apple wants me to update my Xcode.
However, when I try to do so from "updates" tab in App Store, after I press "update" button, it just simply goes to "waiting" and then back to no progress at all. It does not update after that and the icon of the app in Launcher becomes grey, has a progress bar below it and stays at 0bytes.
I tried to delete the app and download it from the App Store again, but it all ends with Xcode.appdownload file being downloaded and that's it. Even if I try to launch that file (I know it's dumb, but should have tried) nothing happens. How do I get my App Store to work again?

Ok, I solved the issue - even though it does not mention System Updates anywhere, all I had to do is to update OS first. C'mon, Apple inc. get your scheiße together, just bugging away is not an answer!

The Mac App Store is broken beyond repair. You can try to reload the update page using CMD-R. That helps sometimes. In addition, Launchpad normally shows the progress correctly.
You can also update from Terminal.app using the command
softwareupdate -l
Good luck!

Related

Latest version of Xcode stuck on installation (12.5)

I just updated my mac to macOS Big Sur, and am trying to update to the next version of XCode. It has been on 75-80% progress for hours:
Also, when I go to launchpad I see this:
Is anyone else having this issue or know how to fix it?
As a first test to check if everything is just going fine but really slow, try this:
Keep the App Store window open (thanks to #Dhruv Saraswat to point this out).
Open the "Console" app (not the "Terminal", but the "Console")
Go to the "Search bar" and type "App Store".
Push "Start" button.
Log lines will be added from time to time showing you how the installation process goes. In my case, I saw "... Completed: 825 of 1000", and some time later I got "... Completed: 826 to 1000", and so on.
That way you can at least check if everything is working, although really slow. You can then guess how long it will take to the "Completed: 1000 to 1000" step in your own situation.
This is weird behaviour everyone face nowadays when installing from AppStore. Instead of that download dmg of required xcode version from apple developer account and install.
Please refer below link to download XCode versions.
Xcode download link for all versions.
Above link contains download link from XCode version 1.0 till the latest.
mine was stuck for about 3 days and even rebooting didn't help!
i was trying to update to xcode 13.2.1 on MacOS Monterey
what i did was:
1- opened Activity Monitor and force quitted "installd" (not sure if it was necessary though!)
2- opened Launcher, held Option key (to make the icons jiggle) and clicked the x on xcode's corner! asked me if i want to delete the app and i confirmed but magically it stayed and when i opened it it was updated to the latest version! so basically it was done installing just didn't know it.
in my case force quit installd, close and open appstore, run update again
Had the same issue after updating my MacBook to Big Sur and trying to update Xcode to version 12.5.
Tried to reinstall, reboot my Mac, delete the app and install it again from App Store.
Decided to leave the installation overnight and it helped! In the morning Xcode was installed successfully.
I was stuck at Completed : 808 of 1000.
This is workaround.
Left down side of App store application screen, there is an account button.
Press account, then you can see message you should ACCEPT something.
Press accept and enter iCloud password.
Then magic. Console's app store log numbers going up.
Just FYI: On the latest Macbook Air M1, 8GB RAM, 256GB SSD, I installed XCode from the App Store. I had exactly the same issue. I thought my installation is stuck. I left Macbook for the whole night, then it downloaded XCode (around 12 GB). After that, it started installing it. I left it for the whole day and didn't touch it. In the evening XCode was installed. I just needed to leave it for around 24 hours to do the job.
Best way is to open 'console' (not terminal) app on Mac and type 'App Store' in the search bar then hit 'go' button as per first screen shot
You will start to see the lines come in and you need to make it wide enough so you get to see the parts number and notice the progress like in the second screenshot
You will notice some of those numbers will move fast, some will take up to 10 minutes, but at least you know you are not 'stuck'!
I had exactly the same situation, I updated MacOS and then updated Xcode to 12.5.1 and it got stuck on 7.2GB of 7.2GB. I left it for 4 hours with nothing happening (but in Activity Monitor 'installd' was working away). I left it overnight and it had sorted itself out by the morning.
If (like me) you only need the command-line tools, you may want to give this a try:
force-quit installd (using ActivityMonitor or ps -kill)
run xcode-select --install from the Terminal command line
Worked for me!
For me, the solution suggested by #thelawnmowerman worked perfectly.
Just need to check the number that is currently in progress out of the total threads. Once it completes the total, in a few mins, the xcode can be launched.
Although it does not speed up, but in Mac App Store, you should see the spinning wheel next in Xcode - place the cursor ON the wheel and you should see the installation progress (eg 52%).
If it does not move, cancel the Xcode installation and start again.
Confirm it has in 13.2 and 13.2.1 as well. Viewing the console app in the top answer will show you when it's done
I updated Xcode on M1 macbook pro with lots of RAM and lots of SSD MacOS 12.1 today from 12.2 to 12.3. It took 4.5 hours. So patience helps, and watching the logs as well.
I had the same problem, and for me, the tips in this thread did not work. What I found to be the problem is that App Store didn't think I had enough space when in fact I had enough space for Xcode.
To solve the "space" problem you can create a dummy file and directly remove it. This allows you to trick your computer that you actually have enough space. (Has to do with containers, read here for more info: https://medium.com/geekculture/installing-xcode-with-not-enough-disk-space-available-b96c8f17115b)
STEP BY STEP GUIDE:
Open the Terminal
Move to the location where you want to create your file using cd. Like cd Documents
Now use command mkfile G your-file-name.ext ( example: mkfile 4G mymovie.mov => will create a movie file with name mymovie of size 4GB)
Hit Enter, It will take some time to complete the process (depends on the file size)
When the command completes the prompt should return and a file would be created.
Go to finder and remove your file. (Move to trash)
Emeditly install Xcode again.
Hope you find it helpful :)
I faced the same issue. I monitored the process using #thelawnmowerman answer. But the process was getting stuck after progressing.
I terminated the App Store every time the process got stuck and opening it again also started monitoring process again, it started progressing every time and I reached to the 1000 (100%).
I am using a base Macbook Air M1 2021 (8 GB RAM). I downloaded Xcode from the
apple developer portal and installed it with the xip command. Open your Terminal and type the below:
xip -x ~/file-location
Double-clicking the file takes too long, the above command took ~5-8 minutes to expand the file. After that just move it to the applications folder so you can find it in the Launchpad.
Reference to answer: https://stackoverflow.com/a/56913909/15425440
Turning off the file shield of your antivirus will helped in my case.
While an anti-virus shouldn’t technically block an app from the Mac App Store, it seems that Xcode is an app with its own unique set of problems which is why disabling the anti-virus works in some cases.
The Console is very helpful. It shows that installation is working, albeit slowly.
I had to download xCode 3 times. Re-install it 3 times. All in all about 8-12 hours effort.
It is still proceeding, SLOWLY.
It would be very helpful if the Apple team put in a better "installation progress" indicator -- like exists for so many other products.
I faced a similar issue while installing the 13.3 version. My progress bar was showing installing for about 1-2 hours and then it started showing waiting. What eventually worked for me was installing it using terminal code "xcode-select --install".
Solved - My new MacBook Air M2 was struggling with downloading and installing Xcode. The problem, I think, was that the laptop sleeps after a short period of time and that stops the download/install process. Download/install restarts at 80% or 0% when the laptop is reawakened - repeat. A simple way to avoid the laptop from sleeping is to open the Terminal application (Application/Utilities/Terminal) and type "caffeinate". That prevents the laptop from sleeping and lets the download/install process complete itself. When done type control-c into the Terminal and it will quit caffeinate.
This was so frustrating for me
When I checked the console, I felt like there was a problem with my account.
Because I changed my password once before.
So I went to App Store -> my account -> I had to login again.
After trying to update to Xcode 14.1 on Ventura for nearly 24 hours, I eventually trashed the Xcode application, rebooted, started only the App Store, and did a new install, leaving the App Store in the foreground. It downloaded (about 7 GB in 20 minutes) and completed the install in less than an hour on my M1 Mac mini.
Background:
After updating to Ventura, there was an update to Xcode 14.1 in the App Store. As with previous versions, I had trouble installing it. This time though, the install would progress to 61% (seen by hovering the mouse over the spinning circle in App Store), then stay there. Filtering for ASDAppQuery in the Console, as suggested in other answers, showed progress for a while, but then also stopped. The installd process was still using a lot of CPU. However, after a while it would stop doing so. It seemed that the App Store app would stop, and a couple of times I checked Activity Monitor and saw that it was in "App Nap" mode. After waking up again, the appstoreagent would run at 95% CPU (one core) for a while, followed by installd running again, at around 300% CPU. This cycle continued, but with no progress. I tried leaving it overnight, but in the morning it was in the same state: neither appstoreagent nor installd doing anything, but then seeming to wake up and grind away again, but making no progress. I had also tried quitting the App Store and starting again, but the same kept happening - going to 61%, then spinning away with no progress indication. Finally, I decided to trash Xcode, reboot, and install - that worked quickly and flawlessly.
fixed forcing close the installd process and run again the App store
Oh, it really helpful!
I user IOS12.3.1 in VMWare Station, and when I update xcode from 13.2 to 13.3, it get stucked.
additoin: my cpu is i5-9
You can open the app store, search XCode and click the stop button. Worked!

I updated Xcode by hand -- App Store keeps trying at night

TL;DR: It appears that Xcode now auto-updates overnight if your Mac is connected to power. I did a manual install, but the (stalled) auto-update still tries overnight. How do I kill this zombie? (Yes, I can turn off auto-update in App Store, but I don't want to. And anyway, the problem would persist when/if I turned it back on.)
Longer: The following steps happened
Yesterday morning my Mac had the error dialog (paraphrasing here) "Could not update, you must quit Xcode"
I quit Xcode
Clicked "Update" in App Store app
Update stalled at 90%, App Store said "Pending"
(Simulator was still running; could have been the problem)
This stalling is a common problem, dealt with in many posts here, notably
Xcode update stuck after updating macOS
Xcode update stuck on "update"
I went to https://developer.apple.com/download/more/ and got and
installed the update by hand
That wasn't the end of my problems; see
Broken xib with xcode 10.3
This morning, I was welcomed with the same "Could not update, you
must quit Xcode" error dialog.
The App Store app still says "Pending" for this update. Apparently you used to be able to press the Option or Control-Option keys to reveal a "Cancel" button, but no longer.
Q: How do I cancel this pending update, short of de-installing current Xcode and re-starting the App Store process? (See How to Completely Uninstall Xcode and Clear All Settings)
Note: FWIW the file
~/Library/Application Support/App Store/updatejournal.plist seems to say my latest version is 9.2.
Note: another suggestion at https://apple.stackexchange.com/questions/345910/how-to-delete-partially-downloaded-updates-in-high-sierra is to delete all contents of $TMPDIR../C/com.apple.appstore/ but that seems drastic.
Note: In Launchpad, the Xcode icon has a blue dot next to it. Could my solution really be as simple as deleting the Xcode icon? Plenty of similar suggestions all over the web...
This seemed to do the trick: sudo softwareupdate --clear-catalog

Xcode update stuck after updating macOS

After updating macOS,
I cannot update XCode anymore:
I have been waiting for 2 hours but AppStore does not update.
How do I restart the Xcode update process from the beginning?
Regards
It updated successfully, after around 5 hours. I just did nothing, just left it there.
It is painfully slow when it comes to the 'Installing' stage.
Based on the log from console, it does not look like it is spinning empty.
For example, progress from 94.67% to ...
... 94.83% took almost 20 sec
A lot of the pain of updating XCode from the App Store can be avoided by downloading the latest version from the Apple Developer website directly (including beta versions if you are into them). Use this Apple Developer link.
For more information see this Ask Different answer.
I also had problems with updating Xcode even after deleting it and trying to install it again via the App Store. For me it helped to switch to the Purchased tab in the App Store and cancelling all the other downloads (by pressing Alt / Option and then clicking Cancel). Then the download of Xcode started, hope this helps!
I think there's a download running in background which would explain this waiting time.
I restarted a few times my Macbook pro, and ended up waiting until it ran the update successfuly.
When you make an XCode update, you have to do it when you have free time ahead, not during rushes, you never know how much time it can take
Currently Xcode update from developer tools does not work. Also Xcode 9.3 after download the install gets blocked because the file is corrupted. Additional Tool for Xcode 9.3 downloads and install but then does not work either. App Store downloads Xcode and restart but then it is not functional
Attempts:
https://developer.apple.com/download/more/
App Store
mac iOS developer tools
I had problem opening .xcworkspace. force quit application window showing it's not responding on macos mojave.
executed below commands after that it started working.
/* remove saved app states for chosen applications*/
rm -rf ~/Library/Saved Application State/com.apple.dt.Xcode.savedState/
/* https://apple.stackexchange.com/questions/104810/is-it-safe-to-erase-library-developer */
rm -rf ~/Library/Developer
In my case, my ISP has a slow connection when downloading from Apple's server. Try using VPN to get a faster connection.
Installing Xcode from App store was stuck for me as well it kept on showing rotating loader, I have to say their progress bar isn't the best indicator. Before losing hopes its always best to check the progress behind the curtain. You are going to need 'Console' app for this.
Search for 'Console' app from Spotlight Search.
Then go to search bar and type "App Store".
Next you need to click on start.
You will see a lot of activity in app store as it happens. You will see something like "Completed: 980 of 1000"(based on your progress). Monitor that and it will move.
So it's a better indicator rather than sitting and watching app store loading progress.

Xcode 5 on Mountain Lion 10.8.5 won't load

Since I installed the Xcode 5 from the App Store I can't start Xcode.
I click on the Xcode icon, then icon bounce 1 time then nothing.
The program doesn't respond...
I tried to uninstall and reinstall Xcode but I got the same problem.
I think the best way is to completely uninstall XCode and its accompanying utilities.
You can follow this link for that.
I am plagued by this problem. Ever since I updated to XCode 5 I have had nothing but trouble. When I open it it does nothing but it does say Application Not Responding when you right-click the icon in the tray.
Once I walked away and hours later when I came back it was open. So I tried it again and waited. around 30 minutes later, it opened. I've figured out that if you wait long enough, eventually it opens.
I know this is only a temporary, partial solution, but it may be all you have until the release Mavericks. I have read in searching for a solution that XCode 5 works in 10.9 but developers struggle using it on 10.8.5 <----- specifically 5!
I just installed the 10.8.5 supplemental 1.0 update and it didn't change anything for me.
Try to open the program and see if letting it sit for a while maybe even overnight, and see if it opens like mine. If so, maybe someone can help with that extra information.
Well i have the exact same problem that you are facing. This is how you can solve it:
First of all just uninstall the current version of Xcode from your Mac completely. You can delete it from the Applications. After that you will still see the Xcode icon in the LaunchPad and i don't know why. You have to delete it from the LaunchPad too. Just by clicking and holding until the cross button appears and then press the cross button to delete.
Once this is done, don't download it from the App Store. Instead download from a direct link. Go to this LINK and find the Xcode and download the DMG file. Then you can install it and you will have no problem.
You can either waste your time troubleshooting the problem or you can just do what i told you to save some time. The choice is yours!
Hope this helps!

OSX Notification Center Icon

I'm using OSX's Notification Center APIs for the first time and can't seem to figure out how to make my app's icon to show up in the Notification badge.
The default "your app doesn't have an icon" icon keeps showing up:
Here's what I've done so far
I have created an icns file that includes 512, 256, 128, 32 & 16px versions
dragged the icon into the "App Icon" section of the target's summary
I made to sure to check the box to copy the icon into the project
the plist's "Icon file" section references the correct icon name (minus the .icns) part
Any ideas? The icon doesn't show up when I run the app thru Xcode or when I export an archive either.
I also have extracted the Sparrow.icns file from Sparrow.app and tried using that one instead of the one I made. That didn't work either.
I was able to fix this issue by incrementing the Build number in the General section for the build Target.
You can force the Notification Center to refresh all of the icons by deleting the Notification Center database file (~/Library/Application Support/NotificationCenter/SOME_UUID.db) and then killing the Notification Center process (e.g., from Activity Monitor).
Unfortunately this has the side effect of deleting your notification history, but this wasn't too much of an issue for me.
There's actually an ongoing debate on Apple's developer forums (link, link for people with access) about this. As far as I know, there's currently no real solution, but you can try the following:
Change your app's bundle ID and try it again. If you change it, clean your app, and change back, some people have reported success with seeing their icon show up.
Log in as another user. The caching Notification Center uses may be per-user, so you might be able to get the properly-iconned notifications as a different person.
The folder location has been moved for OSX 10.10+.
Following command takes to you to its new location:
$ cd `getconf DARWIN_USER_DIR`/com.apple.notificationcenter/db
and then
$ open .
Easiest way that I managed to get the icon to show up is change the Bundle Identifier in your project. This works on OSX 10.10.5 and XCode 7.2
(Once notification center picks up the change, you can change it back to your original bundle identifier if you already have a provisioning profile associated with it)
I have solved the issue by archiving my app and adding a copy to my applications folder. When the app is in Application folder, the icon is always visible even you run the app from XCode...
I tried all of the above suggestions but the only thing that worked for me on 10.14 was to delete DerivedData:
rm -rf ~/Library/Developer/Xcode/DerivedData
If anyone still having this issue, and none of the methods above worked, here is how I solved it:
open Notifications from the System Preference (easiest is to open Alfred or spotlight and type Notifications)
find your application and remove it (press backspace/delete button)
NOTE: this may remove all notifications
I am using Xcode 11.5 and I had the same problem. In my case tough, it was sufficient to clean build output, close and reopen the project. Then do a fresh build and let it run again. The icon was there afterwards.
Side note: I've placed the app icon for every size in the assets.xcassets file, except 1024 x 1024 pixels. Don't know if this is relevant or not. Hope that helps.

Resources