Xcode is not an essential application if you are not looking to develop or program on your Mac. So, if you plan to do some of this in any of the Apple devices, or maybe upload an application to your iPhone, you also need this application. You can get it from the Mac App Store quite easily. However, sometimes the application tends to stop.
This is not as if the installation of any application gets stuck, but the solution is quite easy. Next, we show you how you can fix Xcode if you have it stuck in the macOS installation.
Xcode: basic controls
This is a large application and when you install it from the Mac App Store, it tends to download slowly. Often, users are tempted to install it by torrent, but we tell you that it is not a good idea. Since it could have been manipulated. To do this, do not use any source other than the Mac App Store to download the application.
In addition, it may be worth canceling the installation and removing it. Try starting it again to see if it installs correctly. This is a remote possibility, but you lose nothing with trying. Also, sometimes the complete installation can take hours, so you have to wait a bit. Especially if your Mac is old.
Steps to fix Xcode
You should try each of these solutions, in addition, you may have to download the application again. If you have a slow internet connection, you may need to reserve a time for when you try to solve the problem.
Restart your Mac
This is the oldest troubleshooting tip you will receive, but it works often. Restart your Mac and see if the process continues. It is also possible that you can resume the download and then install the application correctly. Similarly, you may have to remove it and install it again. It doesn't hurt to try both.
Mac App Store
First, open the Mac App Store and log out. Now, cancel the installation / download. Then, exit the Mac App Store and then restart your Mac. Once you have returned to your desktop, open the Mac Store App again, log in again and then download and install the application.
Disable antivirus
If you have an antivirus on your Mac, try to disable it until Xcode is downloaded and completely installed. While an antivirus should not technically block an application from the Mac App Store, it seems that Xcode is an application with its own unique set of problems, so disabling the antivirus might work.