Getting started with Xcode12
By: Vishwa Patel
Tags: iOS, Xcode, Software Development

Xcode is at the center of all development on Apple’s platforms, and with Xcode 12, it has a fresh new look to match macOS Big Sur. Xcode 12 for macOS Universal Apps beta is a distribution of Xcode 12 beta for creating Universal Mac apps that run on both Apple silicon and Intel-based Mac computers.

Here is some introduction about new updates in xcode, it is Xcode 12 Beta release. Update your apps to use new features and test your apps against changes in API. New document tabs make opening multiple files fast and lightweight to support interface files, and logs and project files each open in their own tab. Navigator fonts now match the system size, or can be set to small, medium, or large. And Xcode 12 builds macOS Universal apps by default to support new Macs with Apple silicon.

Xcode 12 for macOS Universal Apps beta includes SDKs for iOS 14, iPadOS 14, and macOS 11. The Xcode 12 for macOS Universal Apps beta release supports on-device debugging for iOS 9 and later. Xcode 12 for macOS Universal Apps beta requires a Mac running macOS 10.15.4 or later.

Xcode’s run destination menu now shows an “Any Mac” destination for Mac schemes. This is a new build destination that builds each target in the scheme for all of their supported architectures, regardless of the native architecture of the local Mac.

New Features

Documents can now be opened in their own tab, making it easy to quickly switch between files while maintaining the rest of Xcode’s configuration. Option-click or double-click to open a document in a tab.

Xcode adds support for previewing widgets, App Clips, and content in Swift packages. For more seamless live previewing on device, Xcode installs the new Xcode Previews app for iOS 14 and iPadOS 14.

The new LibraryContentProvider protocol gives you the ability to show your views and modifiers in Xcode’s library.

Code completions have a new, focused, user interface, making it easier to find a completion. Completions are also more accurate and up to 12 times faster in Xcode 12.

Asset Catalogs

It adds support for Scalable Vector Graphic (SVG) image assets. These preserve their vector representation with deployment targets of macOS 10.15 or later, iOS 13 or later, and iPadOS 13 or later.

The required pixel size is now shown for complication placeholder images.

The “New Asset” menu has been changed to organize asset types by platform.

Debugging

When a process crashes under the debugger, Xcode prints the crash messages in the Console. These messages are similar to the ones displayed in CrashReporter.

Xcode debugger annotations will highlight source code with greater opacity to improve visibility in several Xcode themes.

If you have disabled breakpoints in the Breakpoint Navigator, you can use the contextual menu to delete all the disabled breakpoints.

When paused in the debugger, stepping out of a block will unwind and land in a frame with debug symbol.

Devices

The “Add Device” sheet in the Devices and Simulators window is now resizable.

The Devices and Simulators window permits selecting multiple devices in the navigator, so they can be unpaired together.

Interface Builder

It Added support for the new safeAreaLayoutGuide on NSView introduced in macOS 11.

Introduced a new minimap for the Interface Builder canvas. You can show and hide the minimap with Editor > Canvas > Minimap. Drag the minimap to any corner of the canvas.

Find and Replace now includes matches in attributed string literals.

Interface Builder now has a Current Date option for NSDatePicker.

Standard spacing constraints are now created by default when items are positioned a standard distance from each other.

Added support for SF Symbols in macOS 11.

Added support for UIButton.ButtonType.close .

Added support for the new toolbarStyle in macOS 11.

Added support for the new subtitle property in macOS 11.

Added support for the new NSSearchToolbarItem in macOS 11.

Added support for selecting text styles in macOS 11.

Added support for the new NSTableViewStyle with Automatic, Full Width, Inset, and Source List options.

Playgrounds

In Xcode Playgrounds now you can 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’s Report Navigator now includes Playground build logs.

Xcode Playgrounds now build the active scheme’s targets and make them importable when Build Active Scheme is enabled in the File inspector.

Previews

Xcode now considers edited files and open previews when selecting which app renders previews

Each preview now has buttons to start Live Preview, Preview on Device, Inspect Preview, and Duplicate Preview.

You can click the Inspect Preview button to see modifier recommendations for the selected view and search for the modifier you want to apply.

Xcode supports previewing widgets. For an example of how to configure a widget preview, see WidgetPreviewContext .

The Attributes inspector now offers quick actions for editing the name, device, layout, preferred color scheme, and accessibility text size of a selected preview.

Xcode Previews now supports previewing views in frameworks on-device if the framework is linked by an app in the selected scheme.

Xcode now supports previews for App Clips.

Xcode now connects with the new Xcode Previews app for iOS 14 and iPadOS 14 for greatly improved on-device previews. The Xcode Previews app seamlessly displays changes from Xcode Previews on devices.

The bottom bar of the canvas now contains a button for quickly inspecting the selected view.

Simulator

Simulator can display a simulated device in full-screen mode, or tile its window alongside Xcode.

Simulator now supports 64-bit and 32-bit processes for watchOS 7. To verify watchOS projects are 64-bit clean in Simulator, make sure ARCHS is set to its default value.

Window > Stay on Top keeps device windows in front of other application windows.

Simulator defaults to the internal microphone unless you explicitly choose a different audio source. This avoids triggering phone call mode on Bluetooth headsets which degrades audio quality while listening to music.

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. The farther apart the windows are on screen the greater the reported distance.

Swift

Swift indentation has been overhauled, greatly improving the indentation of chained methods calls, especially those that involve nested or trailing closures.

A property with an attached property wrapper can now rely on type inference to infer the wrapped value type when using default initialization without empty parentheses on the wrapper attribute. For example:

The wrapped property UseWrapper.value uses default initialization of IntWrapper, and relies on type inference to deduce the type-wrapped value type to be Int.

Swift now allows the implicit use of self in @escaping closures when reference cycles are unlikely to occur.

First, implicit use of self in @escaping closures is now allowed if the user has explicitly captured self in the closure’s capture list, so the following code is now valid:

Second, implicit self is available in @escaping closures when self is a value type, making the following code valid:

Notes: Here I try to give description about updates in xcode. It have amazing new features thats helps developers to design apps in easy way. Also It improves the speed for development.

Let me know your thoughts in comment box below!!!

References:

https://developer.apple.com/documentation/xcode-release-notes/xcode-12-for-macos-universal-apps-beta-release-notes

https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes

https://www.apple.com/newsroom/2020/06/apple-reveals-new-developer-technologies-to-foster-the-next-generation-of-apps/