Install Xcode 11 On Catalina

MacOS Catalina is now available as a CI/CD environment on Semaphore. Xcode 11.2, 11.3, 11.4 and 11.5 are preinstalled. After installing Catalina, Xcode refuses to install. It downloads for a long time (slow downloads from Apple) and then refuses to install with no explanation. 'Unable to Download App' “Xcode” could not be installed. Please try again later.

After figuring out a way around the massive breaking change introduced by Xcode 11, it's now time to install Xdebug back on MacOS Catalina.

Update from January 6th 2021:
Using MacOS Big Sur? This solution should work for you too. But since Apple Deprecated PHP in MacOS Big Sur, you should probably rely on Homebrew now.

Update from June 30th 2020:
After some new investigation while trying to upgrade to a newer version of xdebug, I now believe most of the instructions in this post are not necessary. Before doing anything, you should check if xdebug.so already exists in /usr/lib/php/extensions/no-debug-non-zts-20180731/, which I believe is there by default (let me know if otherwise). If it does exist, you could skip to the Enabled support in PHP portion of this post.

Note that building xdebug from source code and actually trying to use that version of xdebug.so (for example by referencing the built file in xdebug/module/xdebug.so after using make install) with the build-in PHP should end up in a 'code signature' error. As described here and here, even after signing the binary, MacOS won't allow system binaries to interact with non-system binaries for security reasons. The only real solution to use a custom version of xdebug would be to compile and use you own instance of PHP instead of the build in one.

Long story short, Apple decided to nuke /usr/include in MacOS Catalina, which has been the default location for C header file for ever in UNIX systems. Trying to install through PEAR / PECL will return an error as the compiler will look for necessary headers file in /usr/include. So the solution is to compile Xdebug manually, manually specifying the actual location of the header files, which are still provided by Xcode, just at a different location.

Xcode

The first step is to get Xcode from the App Store.

Once Xcode installed, we have to get the command line tools :

You might need to actually open Xcode at this point to finish installation and accept terms and conditions, especially if the previous command fails.

Finally, make sure the SDK is found. If the path you get differs from the one bellow, you might need to edit the path accordingly later on:

Manually Compiling Xdebug

Getting source

Let's compile 2.7.2, getting the source code from git. Alternatively, you can download the source from Xdebug site.

phpize

Next we need to make a copy phpize so we can edit the include path :

Find this line :

...and replace it with this line :

Run phpize:

You should now see something like this :

Install Xcode 11 On Catalina Island

Install xcode 11 on catalina update

Configure & build

We can now configure :

...and run make using our custom SDK location defined as compiler flags. I used a variable to store the path to the SDK so it's easier to edit if it changes :

You might see some warning, just ignore it for now. Finally, we'll need to run :

Again, this command will fail because it can't move the extension to the right place. SIP will prevent it. But no worries, we'll take care of that manually at the next step. make install is still required as it will sign the *.so file.

The above trick should work for any PHP extension you want to compile. If you're trying to compile something other than a PHP extension, I recommend having a look at the Makefile to see which directory to include in your custom CPPFLAGS.

Enabled support in PHP

Once make install has been run, we can move the executable somewhere safe. I use /usr/local/php/extensions.

Then we edit the PHP configuration to enable Xdebug. Simply edit php.ini:

And we add the following at the bottom :

Restart built in server to be sure :

And finally test everything went fine :

If the above command returns nothing, then Xdebug is not available on your install. Go back the steps to find out what's missing.

References and thanks :

With the release date of macOS Catalina, 10.15 Xcode 11 beta also released. At the current time to test macOS Catalina on VirtualBox or VMware Workstation. Besides that, if you are a developer to develop any kind of App for macOS or Windows. But the bad news there are different tools for Windows Microsoft to develop any App, but Xcode is not available for Windows. Because of the software which we install on macOS, we can’t install on Windows. Also, most of the developers who develop Apps are interested to use the world number developer tool XCode. Unfortunately, they are a Windows user and the XCode app isn’t exist for Windows. Now worries certainly we taken out the solution to install XCode on Windows. Don’t be frustrated at this point that you can’t install XCode on Windows.

There are multiple ways that you can install XCode on Windows with a platform. To get started you need some effort to access XCode on Windows. As I mentioned for you with the release date of macOS Catalina Apple release XCode 11. Indeed XCode 11 includes interesting features. Like SwiftUI, MiniMap, Rich Documentation, Swift Package Manager, Inline Diff, Transform iPad Apps to Mac, Debugging and Simulators. However, XCode with its significant features is available now in the Mac App Store. If you don’t have a Mac computer to install XCode on that. Then you can install on the guest operating system of macOS on VirtualBox or VMware. Before that, you have to install macOS Catalina on VMware or install macOS Catalina on VirtualBox. Follow the full instruction on how to install XCode on macOS Catalina 10.15 on Windows PC.

XCode 11 latest version includes the following new features

  • SwiftUI: This year one of the latest announcements for Xcode 11 is SwiftUI, the best option for creating layout easily with swift codes. However, SwiftUI shows us the real interface of an App. Adding animations and stuff has gone easy with SwiftUI.
  • MiniMap: The beautiful look of XCode 11 is on Minimap that appears on the left-handed of the window. It allows the developer to quickly go to the specific part of the coding. This feature is available in some other editor software but newly added to XCode 11.
  • Rich Documentation: This part of the feature in XCode 11 looks awesome. Also, the mark hyphen looks better with bolder text. That allows more text to be visible on the screen, it can give a positive effect.
  • Swift Package Manager: Waiting is enough, to add the third-party libraries independencies. With the release of XCode 11 introduced a separate built-in manager for XCode. To have this feature go to Swift Packages, Add Swift packages.
  • Inline Diff: XCode 11 improved to UI to show changes on each line of code based on version control.
  • Transform iPad Apps to Mac: XCode one of the latest and awesome feature is to turn easily iPad Apps fro Mac natively. You can do this by project navigator.
  • Debugging and Simulators: Now iOS Simulator is working faster then the previous version of XCode. Metal frameworks can be tested on iOS 13 and tvOS 13. iOS 13 dark theme is a game-changer, during debugging iOS it will automatically turn light mode to dark mode.

What is XCode?

XCode is an integrated environment development tool for macOS operating system. XCode is a development tool developed by Apple Inc. However, XCode is using for developing Apps, software for macOS, iOS, iPadOS, WatchOS, and tvOS. For the first time, XCode was released in 2003 for macOS users. And now the latest version of XCode version 11.3.1 and available in the Apple Mac Store. You can XCode freely from the Mac App Store for macOS Catalina. XCode is the world No1 development tool that could support, Programming language, C++, Objective-C++, Objective-C, JavaScript, AppleScript, Python, Ruby, and Swift. Certainly, XCode is one of the advanced and professional development tools for macOS Catalina and developers.

Install macOS Catalina on VMware & VirtualBox

Install Xcode 11 On Catalina Download

When everything is possible like installing XCode on Windows PC. Also, you installed macOS Catalina on any Virtualization platform then install XCode on it. It is a great chance to install XCode on it. Through this line below you will get the idea on how to install macOS Catalina on VMware Workstation & VirtualBox. However, there are two separate places where you can install macOS Catalina. Whether you want to install macOS Catalina 10.15 on VMware Workstation. Or whether you want to install macOS Catalina on VirtualBox on Windows PC.

Install xcode 11 on catalina island

There are different virtual machine like VMware Workstation, VirtualBox, Hyper-V. But as I experienced the virtualization installation VMware & VirtualBox is perfect. Both of them are working professionally on Windows PC to run another OS as a guest operating system. The method of installation macOS Catalina on VMware & VirtualBox is the same there aren’t any differences using the VMDK File. But there are separate ways if you use the ISO File of macOS Catalina.

We have done the installation of macOS Catalina perfectly except XCode. On the other hand, you can run multiple Apps of macOS Catalina on a Virtual machine on Windows PC. However, we covered all the files plus installation to make your work easy.

Install XCode on macOS Catalina 10.15 on Windows PC

When you installed macOS Catalina 10.15 on Virtual machine. Then Power on the virtual machine. When you entered the macOS Catalina window click on the Apple Mac App Store. Once the App Store opened on the left-handed search bar type XCode and hit enter.

Type XCode

Once the XCode opened click on Get option

When you clicked on Get, the install button will appear so click on it

Click Install

Now you will be required to login with your Apple ID to install XCode. Enter your Apple ID and password then click Sign in.

Wait until macOS Catalina should download XCode, for the downloading you need a nice internet connection. And the size of XCode is 7.81 GB.

Download XCode

Once the downloading finished it will automatically start installing

When the installation completed click Open

Install Xcode 11 On Catalina Mac

Click Open

Once the XCode launched, you will need to agree with the terms and conditions of it. Click on the Agree button then enter the password and click OK.

Installing the important components of XCode wait until it should complete

Installing components

Once the components installed successfully, the main window of XCode will open. Now go ahead and start XCode on Windows PC.

Read:

Conclusion

Install Xcode 11 On Catalina Update

That’s it enjoy using XCode on Windows PC by installing macOS Catalina 10.15 on Virtual machines. If you are in trouble of installing macOS Catalina or XCode installation process on Windows PC. Feel free to share your problem below in the comment section. We are happy about listening to your problem in the comment section.

Comments are closed.