What’s new in Xcode 11.4?
By: Ashish Kakkad
Tags: Mobile App Development, Mobile, iOS App Development, iOS, Xcode

Xcode 11.4 includes SDKs for iOS 13.4, iPadOS 13.4, tvOS 13.4, watchOS 6.2, and macOS Catalina 10.15.4. Xcode 11.4 supports on-device debugging for iOS 8 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 11.4 requires a Mac running macOS Catalina 10.15.2 or later.

General

Xcode 11.4 supports building and distributing macOS apps as a universal purchase. To distribute your macOS app as a universal purchase, specify the same bundle identifier as your iOS app in the Xcode template assistant when creating a new project. If you have an existing project, edit its bundle identifier in the Project Editor.

Universal purchase is enabled by default for new Mac Catalyst apps created in Xcode 11.4. When you create a new Mac Catalyst app, it will use the same bundle identifier as your iOS app.

Automatic signing in Xcode 11.4 supports building Mac Catalyst apps with a custom bundle identifier. You can edit the bundle identifier of your app using the Signing & Capabilities tab in the Project Editor. If you choose to build your Mac Catalyst app with a custom bundle identifier that does not match your iOS app, you will not be able to distribute the app as a universal purchase.

Build System

Build settings have a new evaluation operator, default , which you can use to specify the default value of a build setting if it evaluates to empty in the context of the evaluation. For example:

$(SETTING:default=something)

If $(SETTING) is empty, this expression evaluates to 'something'. The default value may itself be an expression that contains build setting evaluations.

is empty, this expression evaluates to 'something'. The default value may itself be an expression that contains build setting evaluations. Building codeless kernel extensions with the new build system now requires you to set the GENERATE_KERNEL_MODULE_INFO_FILE build setting to NO .

Debugging

The view debugger now presents layout guides ( UILayoutGuide , NSLayoutGuide ) and their referencing constraints.

, ) and their referencing constraints. View debugging supports showing layers using the Show Layers menu item in the Editor menu.

The exception reason now surfaces as an editor annotation. You can inspect the Exception object in Variables View and find the backtrace of the original uncaught exception, if any, in the Debug Navigator.

You can now use the Terminal for standard I/O, instead of Xcode’s Console. Make this choice using the Scheme Editor’s Options tab.

Interface Builder

Added dynamic system gray colors to inspector color pickers.

Removed inspector support for configuring NSTableColumn header cell fonts to match the API. You can configure header cell fonts by subclassing NSTableHeaderCell and overriding the font property in code.

Metal

The Metal Frame Debugger now supports iOS and tvOS simulators.

Organizer

The Crashes Organizer now shows crash logs for universal purchase macOS apps.

Previews

You can now copy, cut, paste, duplicate, and delete views directly within the Xcode Previews canvas.

Selecting a SwiftUI preview in code now highlights the corresponding preview in the canvas, and vice versa.

Xcode Previews now supports previewing iPad applications brought to the Mac.

Simulator

Dragging and dropping an SSL certificate (CER or PEM file) will now install the certificate into the simulated device’s trusted root store.

simctl supports a keychain subcommand. This command can add certificates to the trusted root store or the keychain. It can also reset the keychain, deleting all saved items. For example, to install "my-selfsigned.cer" to the trusted root store:

$ xcrun simctl keychain <device> add-root-cert my-selfsigned.cer

Adding a certificate to the trusted root store causes TLS / SSL connections to trust the certificate

/ connections to trust the certificate simctl now supports modifying privacy permissions. You can modify privacy permissions to create known states for testing purposes. For example, to allow an example app to access the photo library without any prompts:

$ xcrun simctl privacy <device> grant photos com.example.app

Always test your application after resetting permissions to ensure you have the correct usage description keys in your Info.plist and you are properly requesting and handling different authorization states. See xcrun simctl help privacy for more information.

and you are properly requesting and handling different authorization states. See for more information. Simulator supports toggling appearance for iOS simulators (13.0 and later). From within the app select Debug > Toggle Appearance. From the command line use the simctl ui subcommand, e.g. to set dark appearance:

$ xcrun simctl ui <device> appearance dark

Simulator now has a menu item and keyboard shortcut to bring up the app switcher in iOS Simulators.

simctl status_bar now allows changing the operator (carrier) name.

now allows changing the operator (carrier) name. Simulator now has a menu item to trigger screenshots in iOS simulators. This saves a screenshot to the simulated device’s camera roll. The existing screenshot feature has been renamed “Save Screen” for clarity and continues to save the device’s framebuffer to your Mac’s desktop by default. Hold Option when saving the screen to change the default location.

tvOS simulators no longer capture the TouchBar as if it were a Siri Remote paired with your Mac.

Simulator supports simulating remote push notifications, including background content fetch notifications. In Simulator, drag and drop an APNs file onto the target simulator. The file must be a JSON file with a valid Apple Push Notification Service payload, including the “aps” key. It must also contain a top-level “Simulator Target Bundle” with a string value that matches the target application’s bundle identifier. simctl also supports sending simulated push notifications. If the file contains "Simulator Target Bundle" the bundle identifier is not required, otherwise you must provide it as an argument:

$ xcrun simctl push <device> com.example.my-app ExamplePush.apns

Simulator has a new UI that streamlines working with simulated devices. Simulated device windows have a standard title bar, with buttons for common tasks. App-level settings are now available in the Preferences window.

Source Control

Improved stability of core source control functionality, and reduced memory footprint related issues.

Split functionality of “Fetch and Refresh Status” menu item into two separate menu items to separate fetching and refreshing status.

Explore, Learn and Share!

Happy Coding 🙂