What’s new in Xcode 13.3?

Xcode 13.3 includes SDKs for iOS 15.4, iPadOS 15.4, tvOS 15.4, watchOS 8.5, and macOS Monterey 12.3. Xcode 13.3 requires a Mac running macOS Monterey 12 or later.

Build System

The build system and Swift compiler have a new mode that better utilizes available cores, resulting in faster builds for Swift projects. The mode is opt-in, and you can enable it globally with the following user default:

shell
defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1

Apple says, please report any issues with the new build system mode through Feedback Assistant.

Debugging

When compiling with optimizations turned off, the Swift compiler and Clang no longer eliminate redundant branch instructions on ARM64 targets. This improves debuggability by enabling more breakpoint locations, at the expense of producing slightly larger binaries when compiling with -Onone

Documentation

Xcode can now build documentation from your Swift code in executable targets, like apps and command-line tools.

Organizer

Xcode now automatically sends you Smart Insights Notifications for your apps if you have 10 or fewer apps and if you haven’t previously subscribed to any apps. To activate this feature, click the Regressions item or any of the Metrics items in Organizer.

Source Editor

  • Code completion now suggests enum instances for if case ..
  • Code completion no longer auto-imports a module when completing a nonaccessible symbol.

StoreKit

  • Within StoreKit configuration files, you can now copy, paste, and duplicate products, subscription groups, subscription offers, and localizations.
  • You can now configure offers for codes in StoreKit configuration files when using StoreKit Testing in Xcode. You can redeem these offers when testing on devices running iOS 15.4 or later.
  • You can now toggle a new mode in StoreKit configuration files called Billing Retry on Renewal. This mode causes subscriptions to enter a simulated Billing Retry period when a subscription is set to renew. This mode works on devices and simulators running iOS 15.4, macOS Monterey 12.3, watchOS 8.5, or tvOS 15.4.
  • You can now test subscription price increases on devices or simulators running iOS 15.4, macOS Monterey 12.3, watchOS 8.5, and tvOS 15.4. You can test requesting and responding to price increase consent on a subscription transaction using the transaction manager.When testing subscription price increases on a device running iOS 15.4 or later, each request for price increase consent simulates calling the payment queue delegate method paymentQueueShouldShowPriceConsent(_:).

Swift

  • You can now write inverted availability conditions using the new #unavailable keyword.

For example:

if #unavailable(iOS 15.0) {
// Old functionality
} else {
// iOS 15 functionality
}

  • You can now include type placeholders in type expressions and annotations. Type placeholders direct the compiler to set the type for that position according to the usual type inference rules. To use a type placeholder, enter an underscore (”_”) instead of the type name.

For example:

// This is OK--the compiler can infer the key type as Int.
let dict: [_: String] = [0: "zero", 1: "one", 2: "two”]

Conclusion

Currently Xcode 13.3 released with iOS 15.4. iOS 15.4 has Face ID With a Mask, Emojis, Apple Card Widget, Universal Control and many more things.

Let me know if you have any questions, comments, or feedback – either via Twitter.

Stay Safe At Home. Learn Something New. Share To The World.
Happy Coding 🙂