Well, this has been a particularly exciting year on the Xcode front, hasn’t it?
- Xcode 11 supports development with SwiftUI…
- SwiftUI live views and inline results in playgrounds are supported…
- Xcode 11 adds support for Mac Catalyst to bring iPad apps to the Mac…
- Xcode now supports creating and working with Swift packages, as well as adding, removing, and managing package dependencies…
- An XCFramework makes it possible to bundle a binary framework or library for multiple platforms…
- The new Metrics organizer shows battery life and performance analytics for your app to help you drive optimizations…
- Xcode 11 supports the new Apple Development and Apple Distribution certificate types. These certificates support building, running, and distributing apps on any Apple platform…
- Metal is available in iOS 13 and tvOS 13 simulators when running on macOS 10.15…
- Introduces the ability to view inline code diffs for changes in the Source Editor…
Not sure “particularly exciting” covers it actually, this is the biggest Xcode update in the history of ever far as we can remember! Read the whole thing, and then the latest point release notes up to 11.3 Beta as we type this; and here’s a couple particularly good visual-enhanced tours of the new goodies:
Xcode: All the Way to 11
What’s new in Xcode 11? [Updated for 11.1 and 11.2]
Personally, this version of Xcode is a veritable benediction, given how many years we’ve been desperately looking forward to disposing of third party dependency managers…
Ready for Swift Package Manager?
Replacing CocoaPods with Swift Package Manager
Launching the SwiftPM Library + SwiftPM Catalog
…and once more being able to use workspaces as actual, y’know, workspaces. We’re not quite there with our latest project — the last serious roadblock is Firebase requiring binary framework support — but we are very close indeed! Mind you, we did have to do some considered refactoring to dispose of some pods that weren’t Pure Swift™, there’s a good if overly despondent summary of the various existing drawbacks here:
Dependency Heck
The state of iOS dependency management in 2019 is not great, and might get worse before it gets better…
Although we disagree with that completely, it’s orders of magnitude better than Xcode 10 even with the loose ends lying about still and getting better by the day, we say! In the meantime, aside from the third party dependency migration pains, even more important in the future is it’s much easier now to manage your internal dependancies and modularity with SPM:
Update your existing iOS Framework to Swift Package
Creating Swift Packages in Xcode + Editing A Swift Package
Managing dependencies using the Swift Package Manager
And that’s about enough for SPM for now. Next thing we’d like to highlight from that intro list is what drives that Metrics organizer, in case you’d overlooked it so far:
MetricKit
With MetricKit, you can receive on-device app power and performance metrics captured by the system. A registered app receives reports containing data about the previous 24 hours at most once per day…
Introduction at Improving Battery Life and Performance
NSHipster has a deeper dive in MetricKit
And for a really deep dive, check out MetricKit Internals!
SwiftUI and Catalyst are going to require some deep, deep diving of their own; for now, we’ll list miscellaneous other new and old Xcode tips we’ve collected since The Xth-Code Files: Xcode 10 Tips:
one small change for xcode, one giant leap for productivity
XCode allows you to take a snapshot of the state of the app you are developing and restore it later when you run the app or run the tests. Pretty cool!
Xcode 11 environmental overrides
Have you used the accessibility inspector to change the dynamic type size of your running app? Did you know you can do that directly from the debugger with Xcode 11? Even better, it allows you to override the interface style to quickly switch between light and dark modes…
Sherlock turbocharges your iOS simulator
There aren’t many times outside of WWDC where Apple developers see a new tool and immediately think “I need that in my life.” Sherlock by Inspired Code is one such tool: it injects itself into the iOS Simulator so that it can monitor views and adjust them in real time…
NSHipster’s simctl has Simulator tips you really want to know about
Better Storyboards with Xcode 11
Using Xcode Previews with existing views without using SwiftUI
Add a View <> ViewModel Jump To Counterpart
XCAssetsKit: “.xcassets parser written in Swift”
QuickLook plugin to visualize .car files (compiled Asset Catalogs)
Speeding up with Xcode Behaviors
Awesome-Xcode-Behaviors
The fastest way to Xcode: “Using the power of aliases in your Terminal”
Xcode: Basics of the four-block wonder aka “Navigate to Related Items”
37 Xcode Tips and Shortcuts to speed up your daily development
Unused images and resources clean up in Xcode
Unused localized strings clean up from a Strings file
Variable Width Strings
Where the &$!#% Is Localizable.Strings?!?
PoeditApp: “The fastest and most convenient way to translate apps & sites with gettext”
Periphery: “A tool to identify unused code in Swift projects.”
Streamlining your development workflow with Xcode Templates
ios-project-template: “iOS project template with fastlane lanes, Travis CI jobs and GitHub integrations of Codecov, HoundCI for SwiftLint and Danger”
Building Faster in iOS with Bazel
Project generation: Introduction to development of Tuist: “Bootstrap, maintain, and interact with Xcode projects at any scale”
And finally, to remind us that not quite everything is better these days:
XcodeKit and Xcode Source Editor Extensions
When we last wrote about extending Xcode in 2014, we were living in a golden age, and didn’t even know it…
Ah well. There’s still some good ones out there — our Most Useful™ Award goes to
SwiftMockGeneratorForXcode — An Xcode extension (plugin) to generate Swift test doubles automatically.
Check it out!