Xcode is the complete developer toolset used to create apps for Apple TV, Apple Watch, iPad, iPhone, and Mac. Xcode 12 includes everything you need to create amazing apps for all Apple platforms. Xcode 12 also builds Universal apps by default to support upcoming Mac with Apple Silicon.
Xcode 12 supports developing apps for iOS 14, iPadOS 14, tvOS 14, watchOS 7, macOS 10.16. Xcode 12 supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 12 requires a Mac running macOS Mojave 10.15.4 or later.
Xcode 12 for macOS Universal Apps ("Apple silicon") supports developing apps for iOS 14, iPadOS 14, and macOS 11. The Xcode 12 for macOS Universal Apps release supports on-device debugging for iOS 9 and later. Xcode 12 for macOS Universal Apps beta requires a Mac running macOS 11 or later.
SwiftUI (no SwiftUI 2.0) offers some new features with lots of performance improvement. Also, existing SwiftUI code continues to work, with faster performance, better diagnostics, and access to new controls.
- Now SwiftUI has complete new life cycle management API for apps built with SwiftUI. So, now you can share life cycle code across all Apple platforms.
- All new widgets are built on SwiftUI. So, you can build widgets using SwiftUI that'll works all Apple platforms.
- With Xcode 12, SwiftUI views can now be shared with other developers, and appear as first-class controls in the Xcode library.
Xcode 12 has a completely new Organizer with all-new design that groups all critical information about each of your apps together in one place. Choose any app from any of your developer teams, then quickly navigate to inspect crash logs, energy reports, and performance metrics, such as battery consumption and launch time of your apps when used by customers.
- Organizer now allow to compare and contrast metrics associated with different version of an application.
- Organizer now displays scroll-hitch metrics. You can use these metrics to identify animation delays users encounter while scrolling in your application. To view the Scroll Hitch bar graph, click on the Scrolling section in the Metrics Organizer window.
- Organizer now also provides Disk Writes diagnostic reports. You can use these reports to optimize the disk-write performance of your apps.
- Xcode 12 has a new tab model. With this update model, you can re-arrange the document tabs to create a working set of files for your current task, and configure how content is shown within each tab.
- Xcode 12 comes with a new code completion UI with only the information you need. So, it is more compact and taking up less screen space.
- The project navigator now takes advantages of the system setting to resize "Sidebar Font & Icon Size" similar to Finder. You can also choose a unique font and icon size for Xcode within Xcode Preferences.
- Xcode 12 add a new minimap for the Interface Builder canvas. You can drag, double-click or command-click in the minimap to focus on a specific area. You can enable and disable this minimap with Editor > Canvas > Minimap. This will be very helpful in large size storyboard.
- When an
IBDesignableview fails to build then Xcode will show an error directly on the view in canvas. And by clicking on error icon provides a popup that displays the error for easier debugging.
- macOS 11 has new
- Now you've Current Date option for
NSDatePickerin Interface Builder.
- macOS 11 now supports SF Symbols.
- UIButton now has a
UIButton.ButtonType.close) to dismiss panels and views.
- Xcode 12 now displays the breakpoint hit count for a particular breakpoint location. Like "Thread 1: breakpoint 1.1 (14)", where 14 means that breakpoint 1.1 has been hit 14 times.
- You can re-order breakpoint actions by dragging and dropping them into a different position.
- You can name a breakpoint, and reference it by name from another breakpoint's action. For example, to enable a previously disabled breakpoint called "MyBreakpoint", type break enable MyBreakpoint in an action’s Debugger Command field.
- Breakpoint contextual menu now has an option to delete all the disabled breakpoints.
- Now you can export view hierarchies captured with Xcode to
- You can share exported view hierarchy file with anyone. You can open this file in Xcode directly.
- To keep simulator in front of other application you can select
Stay On Top.
- Now simulator by default uses the internal microphone unless you manually select a different audio source.
- Simulator now supports 32-bit & 64-bit processes for watchOS 7. To verify watchOS projects are 64-bit clean in Simulator, make sure ARCHS is set to its default value.
- With Xcode 12, simulator supports simulating Nearby Interaction for devices that support the feature. Dragging the device window around on the screen will update the simulated distance between the two devices.
- Playgrounds now support asset catalogs.
- Xcode 12 Report Navigator now includes Playground build logs along with Project build logs.
- If a Playground live view has a size of zero, a banner now indicates why the live view is not visible.
- Xcode Playground now automatically compiles Core ML models in its Resources folder and Playground code can access the generated ML model interface.
- Xcode Playgrounds can now import and use Swift packages and frameworks. Select the Build Active Scheme checkbox in the playground's File inspector and ensure that the active scheme builds the package or framework target.
- Xcode Playgrounds now build the active scheme's targets and make them importable when Build Active Scheme is enabled in the File inspector.
Store Kit (Local Test Environment)
Xcode 12 now supports testing of In-App Purchases (IAP) directly in Simulator or on a connected device, using a new local StoreKit test environment.
This means you can configure in-app purchase server locally for testing, before setting it up in App Store Connect and without a connection to App Store servers.
For more information please check following docs -
- The number of passing, failing, and skipped tests is now surfaced in the test report UI.
- It is now possible to customize Default Execution Time Allowance and Maximum Execution Time Allowance in the Test Plan Editor. But in this version of Xcode these settings are disabled.
- UI Testing now can handle banner notifications on iOS that block the navigation bar during UI testing.
- You can now declare conditionals Swift packages target dependencies, such as limiting the dependencies by a platform.
- Swift packages can now contain resources such as asset catalogs, images, localized content (
.lproj), storyboards, and other files. A depends package adds the package's code and resources to the app bundle for use at runtime.
Xcode 12 for macOS Universal Apps includes a common macOS SDK that contains all the frameworks, debuggers, compilers, and all other tools you need to build apps to support Apple Silicon and Intel x86_64 CPU. Even Xcode 12 is built as a Universal app. That means, Xcode 12 runs natively on Intel-based CPUs as well as on Apple Silicon.
- When you open your existing project in Xcode 12, your app will automatically get updated to generate release builds & archives as Universal apps.
- When you build the app, Xcode produces two binary, one binary for Apple Silicon and another one for the Intel x86_64 CPU, then wraps them together as a single app bundle.
- With the new Apple Silicon Mac, you can test your app on multiple architectures. You can run and debug apps on either the Apple Silion or on Intel virtualization by selecting "My Mac (Rosetta)" in the toolbar.
- Xcode 12 run destination menu added an "Any Mac" destination for Mac schemes. This new build destination will build each target in the scheme for all supported architectures, regardless of the native architecture of the local Mac.
Download Xcode 12 Beta 2.