8/23/2021

A Glimpse Of Xcode

Launching Xcode. If nothing happens, download Xcode and try again. Launching Visual Studio. If nothing happens, download the GitHub extension for Visual Studio and try again. 13 commits Files Permalink. Failed to load latest commit information. The left pane shows the list of errors and warnings and some hints are provided inside the code. Xcode includes another piece of software called iOS Simulator which behaves as a native iPhone right on your computer. To build and run your application just click the circle button in the top left corner, or alternatively CMD+R as a shortcut. This pops open the simulator and you’ll catch a glimpse of the app loading into view. In Part 1 of this series, you were treated to a glimpse of Xcode’s underlying classes through NSNotification properties and injected code into the private class DVTBezelAlertPanel. In addition, you added a NSMenuItem to the menu to persist your preference of enabling Rayrolling in Xcode. In this article, we have had more than a superficial glimpse of Xcode and LLDB’s advanced features, though there is more to discover. You have learned the following in this article: Using LLDB’s advanced debugging features; Making your custom classes debug-printable; Running your.

We all know that Xcode has struggled with being a little on the portly side for some years, and even Apple acknowledged this back at WWDC 2012. Here’s what Matthew Firlik (Director of Development Technologies at Apple) had to say at the time:

Last year [at WWDC 2011] when we shipped Xcode 4.1 our download size was a little bit over 4 gigabytes, and I don't think there's anything more to be said about that. When we shipped Xcode 4.2 we were able to shrink that package size down to about 1.5 gigabytes by making some of the legacy content – like the older iOS simulators – downloadable on demand.

At the time that was a big and welcome improvement, but sadly it wasn’t to last: after going on its crash diet in 2012, Xcode has since been busy at the dessert aisle and has grown far beyond the “no more to be said about that” size of Xcode 4.1.

Let’s take a look at some figures:

VersionDownloadInstalled
Xcode 5.02.05 GB4.37 GB
Xcode 6.02.62 GB5.18 GB
Xcode 7.03.85 GB7.79 GB
Xcode 8.04.41 GB9.97 GB
Xcode 9.05.37 GB10.41 GB

Now, some amount of natural fluctuation is to be expected – as Firlik said back in 2012, Apple can adjust its selection of simulators in order to reduce the initial download at the expense of possible later downloads.

It’s also important to note that Xcode has added features over those years, such as Swift in Xcode 6 or App Thinning in Xcode 7, so some amount of natural growth is inevitable. Many developers – myself included! – have a long wish list of features we want to see in Xcode 10, so there’s a never-ending trade-off between cutting size and adding features.

SPONSORED Would you describe yourself as knowledgeable, but struggling when you have to come up with your own code? Fernando Olivares has a new book containing iOS rules you can immediately apply to your coding habits to see dramatic improvements, while also teaching applied programming fundamentals seen in refactored code from published apps.

But wait – there’s more!

All this extra growth means that Xcode 9 is more than twice the size of Xcode 5, but even that’s not the whole story. You see, Xcode is a bit sneaky: the 10.41GB that Xcode 9 takes up is actually only its starting size.

Each time you connect a device to your computer, you might have noticed Xcode likes to spend some time “Processing symbol files” or “Preparing debugger support” for that device. This happens once per iOS version, although it’s extremely fine-grained – even going from iOS 11 beta 9 to iOS 11 beta 10 will cause this process to repeat.

What Xcode is doing is configuring its device support system so that it understands all the frameworks that ship inside the iOS version you connected, which in turn means it can symbolicate crash logs. This is no small amount of data – you can expect Xcode to chew up 2-3GB for each iOS version you connect.

The problem is, Xcode doesn’t ever seem to want to remove device support once it’s installed, so if you’re an active iOS developer who doesn’t actively prune this yourself there’s a good chance you’ll find around 40GB or more of device support data – most of which is for iOS versions that you don’t even think about any more.

In my case, I recently finished writing a book teaching all the new iOS APIs in iOS 11, which meant I had installed iOS 11 betas 1 through 10 on my devices. If I hadn’t been cleaning Xcode’s device support directory, each of those combined would have been taking up a whopping 20GB of space, even though each beta version was effectively rendered obsolete as soon as its successor came out.

Save 20GB with this one weird trick

Xcode’s initial install size is beyond our control, but its extended post-install growth is something you can reduce. First, install the awesome tool GrandPerspective, then point it at your ~/Library/Developer directory.

This is where Xcode stores three chunky parts of its ecosystem:

  1. The iOS Device Support directory stores debugging data for individual iOS versions.
  2. The Derived Data directory is the storage area Xcode uses while building your apps.
  3. The CoreSimulator directory is where Xcode’s simulator data lives, including all apps you’ve installed into simulators.

Keep in mind that each of those simulators is feature complete, right down to those sample photos you see in the Photos app. If you’re curious, try searching ~/Library/Developer for “IMG_0005.JPG” – I found 90 copies of the same photo. Nice!

When GrandPerspective finishes – and it might take some time – you’ll see something like the image below:

GrandPerspective shows you the total space taken up by the scanned directory in the bottom-left corner (20.7GB for me), but you can also hover over individual files to see what they are and how much they take up.

To make things easier to read I’ve added some annotations to mine so you can get an idea of where all the space goes:

OK, so maybe I’ve been a touch facetious, but the point is that the majority of the files you can see in my developer directory aren’t needed. You can literally just delete them outright and Xcode will recreate the bits it actually needs when you next plug an iOS device in.

If you want to clear out individual simulator directories you can, but honestly the easiest thing to do is zap the device support directories – they will usually be well over half the used space.

Here’s how to do it:

  1. Right-click one of the big files GrandPerspective found – it will be called dyld_shared_cache_arm64 – and choose Reveal In Finder.
  2. In Finder, hold down the Cmd key and press the Up cursor key a few times until you finally have a folder called “iOS DeviceSupport” selected.
  3. Go back into that folder and you’ll see it has directories for iOS version numbers, e.g. 9.3.5 (13G36), 10.3.2 (14F89), and 10.3.3 (14G60).
  4. Select all of them, delete them, then empty the trash.
  5. Plug in your iOS devices then launch Xcode so it can download the symbols you actually need.
  6. Feel smug.

Isn’t there a better way?

It’s understandable that Xcode needs some device support in order to function correctly. However, its insistence on keeping all device support is unhelpful, and it would be great to see some work being done to have this trimmed automatically.

For example, would it be so bad for Xcode to scan its device support every time it launches, and say “well, they haven’t connected one of these in three months; let’s scrap it”? It could even be an option that’s disabled by default if Apple think so many want old device support around – but at least give the rest of us the chance to have Xcode use up less than 50GB.

Xcode: I love you, but I hope you’ll consider this an intervention and stay off the carbs in the run up to Xcode 10.

And finally, in case you were curious…

As difficult as it is to weigh one version of Xcode against another because their contents differ, it’s deeply unfair to weigh one IDE against another – what Apple chooses to bundle and what Google chooses to bundle bear little to no relation.

Still, admit it: you’re a teensy bit curious how Xcode stacks up against Android Studio, which is the tool our Android counterparts rely on for building apps.

Well, to satisfy your curiosity if nothing else, let me re-make that table…

VersionDownloadInstalled
Xcode 5.02.05 GB4.37 GB
Xcode 6.02.62 GB5.18 GB
Xcode 7.03.85 GB7.79 GB
Xcode 8.04.41 GB9.97 GB
Xcode 9.05.37 GB10.41 GB
Android Studio 2.3486MB861MB

In the words of Matthew Firlik, I don't think there's anything more to be said about that.

SPONSORED Would you describe yourself as knowledgeable, but struggling when you have to come up with your own code? Fernando Olivares has a new book containing iOS rules you can immediately apply to your coding habits to see dramatic improvements, while also teaching applied programming fundamentals seen in refactored code from published apps.

Xcode is a complete developer toolset for creating apps for Mac, iPhone, iPad, Apple Watch, and Apple TV. Xcode brings user interface design, coding, testing, debugging, and submitting to the App Store all into a unified workflow.

Downloading and updating Xcode

The current release of Xcode is available as a free download from the Mac App Store. The Mac App Store will notify you when an update is available or you can have macOS update automatically as it becomes available.

The latest beta version and previous versions of Xcode can be downloaded from the Downloads page. To download Xcode, simply sign in with your Apple ID.Apple Developer Program membership is not required.

Using Xcode

Get step-by-step guidance on how to use Xcode to build, test, and submit apps to the App Store.

A Glimpse Of Xcode Tutorial

Glimpse

Submitting apps to the App Store using Xcode

If you’re an Apple Developer Program member, Xcode provides an integrated workflow to prepare and submit apps to App Store. You should use the latest version of Xcode available on the Mac App Store to submit your apps, or when available, the latest GM seed release from the Downloads page.

Do not submit apps built using beta software, as beta versions of Xcode, Operating Systems, and SDKs are for development and testing only.

Learning about changes to Xcode

To learn about the latest features and capabilities in Xcode, see What’s New in Xcode. For update details in the latest released versions, including each beta release, see the Xcode Release Notes.

Minimum requirements and supported SDKs

A Glimpse Of Xcode Download

Xcode VersionMinimum OS RequiredSDKArchitectureOSSimulatorSwift
Xcode 12.3 betamacOS Catalina 10.15.4 (Intel-based Mac)
macOS Big Sur 11.0
(Apple silicon Mac)
iOS 14.3
macOS 11.1
tvOS 14.3
watchOS 7.3
DriverKit 20.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 9.0-14.3
iPadOS 13.0-14.3
macOS 10.9-11.0
tvOS 9.0-14.3
watchOS 2.0-7.2
iOS 10.3.1-14.3
tvOS 10.2-14.3
watchOS 3.2-7.2
Swift 4
Swift 4.2
Swift 5.3
Xcode 12.2macOS Catalina 10.15.4 (Intel-based Mac)
macOS Big Sur 11.0
(Apple silicon Mac)
iOS 14.2
macOS 11
tvOS 14.2
watchOS 7.1
DriverKit 20.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 9.0-14.2
iPadOS 13.0-14.2
macOS 10.9-11.0
tvOS 9.0-14.2
watchOS 2.0-7.1
iOS 10.3.1-14.2
tvOS 10.2-14.2
watchOS 3.2-7.1
Swift 4
Swift 4.2
Swift 5.3
Xcode 12.1macOS Catalina 10.15.4 (Intel-based Mac)
macOS Big Sur 11.0
(Apple silicon Mac)
iOS 14.1
macOS 10.15.6
tvOS 14.0
watchOS 7.0
DriverKit 20.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 9.0-14.1
iPadOS 13.0-14.1
macOS 10.9-11.0
tvOS 9.0-14.0
watchOS 2.0-7.0
iOS 10.3.1-14.1
tvOS 10.2-14.0
watchOS 2.0-7.0
Swift 4
Swift 4.2
Swift 5.3
Xcode 12macOS Catalina 10.15.4 (Intel-based Mac)
iOS 14
macOS 10.15.6
tvOS 14
watchOS 7.0
DriverKit 20.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 9.0-14.0
iPadOS 13.0-14.0
macOS 10.6-10.15.6
tvOS 9.0-14.0
watchOS 2.0-7.0
iOS 10.3.1-14.0
tvOS 10.2-14.0
watchOS 3.2-7.0
Swift 4
Swift 4.2
Swift 5.3
Xcode 11.7macOS Catalina 10.15.2iOS 13.7
macOS 10.15.6
tvOS 13.4
watchOS 6.2
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.7
iPadOS 13.0-13.7
macOS 10.6-10.15.6
tvOS 9.0-13.4
watchOS 2.0-6.2
iOS 10.3.1-13.7
tvOS 10.2-13.4
watchOS 3.2-6.2
Swift 4
Swift 4.2
Swift 5.2
Xcode 11.6macOS Catalina 10.15.2iOS 13.6
macOS 10.15.6
tvOS 13.4
watchOS 6.2
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.6
iPadOS 13.0-13.6
macOS 10.6-10.5.6
tvOS 9.0-13.4
watchOS 2.0-6.2
iOS 10.3.1-13.6
tvOS 10.2-13.4
watchOS 3.2-6.2
Swift 4
Swift 4.2
Swift 5.2
Xcode 11.5macOS Catalina 10.15.2iOS 13.5
macOS 10.15.4
tvOS 13.4
watchOS 6.2
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.5
iPadOS 13.0-13.5
macOS 10.6-10.15.4
tvOS 9.0-13.4
watchOS 2.0-6.2
iOS 10.3.1-13.5
tvOS 10.2-13.4
watchOS 3.2-6.2
Swift 4
Swift 4.2
Swift 5.2
Xcode 11.4.xmacOS Catalina 10.15.2iOS 13.4
macOS 10.15.4
tvOS 13.4
watchOS 6.2
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.4.x
iPadOS 13.0-13.4.x
macOS 10.6-10.15.4
tvOS 9.0-13.4
watchOS 2.0-6.2
iOS 10.3.1-13.4.x
tvOS 10.2-13.4
watchOS 3.2-6.2
Swift 4
Swift 4.2
Swift 5.2
Xcode 11.3.xmacOS Mojave 10.14.4iOS 13.3
macOS 10.15.2
tvOS 13.3
watchOS 6.1.1
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.3
iPadOS 13.0-13.3
macOS 10.6-10.15.2
tvOS 9.0-13.3
watchOS 2.0-6.1.1
iOS 10.3.1-13.3
tvOS 10.2-13.3
watchOS 3.2-6.1.1
Swift 4
Swift 4.2
Swift 5.1
Xcode 11.2.xmacOS Mojave 10.14.4 iOS 13.2
macOS 10.15.1
tvOS 13.2
watchOS 6.1
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.2.x
iPadOS 13.0-13.2.x
macOS 10.6-10.15.1
tvOS 9.0-13.2
watchOS 2.0-6.1
iOS 10.3.1-13.2.x
tvOS 10.2-13.2
watchOS 3.2-6.1
Swift 4
Swift 4.2
Swift 5.1
Xcode 11.1macOS Mojave 10.14.4 iOS 13.1
macOS 10.15
tvOS 13
watchOS 6.0
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.1
iPadOS 13.0-13.1
macOS 10.6-10.15
tvOS 9.0-13.0
watchOS 2.0-6.0
iOS 10.3.1-13.1
tvOS 10.2-13.0
watchOS 3.2-6.0
Swift 4
Swift 4.2
Swift 5.1
Xcode 11macOS Mojave 10.14.4iOS 13
macOS 10.15
tvOS 13
watchOS 6.0
DriverKit 19.0
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-13.0
iPadOS 13.0-13.0
macOS 10.6-10.15
tvOS 9.0-13.0
watchOS 2.0-6.0
iOS 10.3.1-13.0
tvOS 10.2-13.0
watchOS 3.2-6.0
Swift 4
Swift 4.2
Swift 5.1
Xcode 10.3macOS Mojave 10.14.3iOS 12.4
macOS 10.14.6
tvOS 12.4
watchOS 5.3
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-12.4
macOS 10.6-10.14.6
tvOS 9.0-12.4
watchOS 2.0-5.3
iOS 10.3.1-12.4
tvOS 10.2-12.4
watchOS 3.2-5.3
Swift 4
Swift 4.2
Swift 5
Xcode 10.2xmacOS Mojave 10.14.3iOS 12.2
macOS 10.14.4
tvOS 12.2
watchOS 5.2
x86_64
armv7
armv7s
arm64
arm64e
iOS 8.0-12.2
macOS 10.6-10.14.4
tvOS 9.0-12.2
watchOS 2.0-5.2
iOS 8.1-12.2
tvOS 9.0-12.2
watchOS 2.0-5.2
Swift 4
Swift 4.2
Swift 5

A Glimpse Of Xcode Ide

Xcode

Legend

Minimum OS Required: The version of macOS required to install this version of Xcode.

SDK: The version of SDKs included in this version of Xcode.

Architecture: The architectures supported for development by this version of Xcode.

A Glimpse Of Xcode Development

OS: The iOS, iPadOS, macOS, tvOS, and watchOS versions supported by this version of Xcode for developing, installing, and debugging applications.

Simulator: Versions of iOS, tvOS, and watchOS simulators supported for development by this version of Xcode.

Swift: Version of Swift supported for development by this version of Xcode. Sticky notes to help understand twitter.

Providing feedback and reporting bugs

Your feedback goes a long way towards making Xcode even better. With Feedback Assistant, you can report issues or request enhancements to APIs and tools. Include detailed information about issues, including the system and developer tools version information, and any relevant crash logs or console messages. To ask questions and find answers by Apple engineers and other developers, visit the Apple Developer Forums.

Invalid private key and certificate pairing

If you received an error message saying, 'Xcode could not find a valid private-key/certificate pair for this profile in your keychain.' This error message indicates that the Keychain Access application on your Mac is missing either the public or private key for the certificate you are using to sign your app.

Glimpse Core

This often happens when you are trying to sign and build your app from a different Mac than the one you originally used to request your code signing certificate. It can also happen if your certificate has expired or has been revoked. Ensure that your app’s provisioning profile contains a valid code signing certificate, and that the Keychain Access application on your Mac contains that certificate, the private key originally used to generate that certificate, and the WWDR Intermediate Certificate.

For instructions on how to resolve this and other code signing errors, review the Code Signing Support page.

A glimpse of xcode tutorial

Apple security updates

For information on the security content of Xcode updates, visit the Apple security updates page.