New Tools for 64-bit Support in Xcode 9.3

 

New Tools for 64-bit Support in Xcode 9.3

The last macOS release to support 32-bit apps without compromise is macOS High Sierra. Make sure future releases of your app are 64-bit compatible by using new diagnostic tools in Xcode 9.3 beta and testing on macOS 10.13.4 beta. This version of Xcode also builds 64-bit apps by default.

Supported Configurations

Xcode 9.3 beta requires a Mac running macOS 10.13.2 or later.
Xcode 9.3 beta includes SDKs for iOS 11.3, watchOS 4.3, macOS 10.13.4, and tvOS 11.3.

Deprecation of macOS 32-bit support

To prepare for a future release of macOS in which 32-bit software will no longer run without
compromise, starting in macOS High Sierra 10.13.4 a user is notified on the launch of an app that
depends on 32-bit software. The alert appears only once per app.
Developers can use a new 64-bit testing mode in macOS 10.13.4 to test software for 64-bit
compatibility.
NOTE: It is strongly recommended that this mode is enabled only by developers or experienced IT
administrators.
To enable 64-bit mode:

  1. Launch Terminal
  2. Execute the following command: sudo nvram boot-args=”-no32exec”
  3. Restart the machine

64-bit test mode prevents 32-bit processes from launching. Launching an app that depends on 32-
bit software results in a notification that the application can’t be opened. Other types of software
may fail silently, such as 32-bit versions of Dashboard and WebKit plugins, preference panes, and
background processes.
Disable the test mode once the software is updated to work in 64-bit.
To disable the test mode:

  1. Launch Terminal
  2. Execute the following command: sudo nvram boot-args=“”
  3. Restart the machine

Swift and Apple LLVM Compilers

  • Objective-C methods with selectors that start with add or remove are now named consistently
    when imported into Swift. Previously, each occurrence of the same selector could be
    nondeterministically named by using or not using the portion of the name after add or remove,
    such as importing addThing: as either add(🙂 or addThing(🙂
  • A class and instance method with the same selector on an Objective-C protocol are both
    callable on a class that implements that protocol.

Swift Compiler

  • When swiftc is run from the command line, the default deployment target is set to the version of the currently running OS.
  • Calls to unavailable functions are permitted if the calling context is also marked unavailable. This simplifies writing code that can be compiled with and without application extension restrictions enabled.
  • The compiler now warns for more cases of non-exclusive memory access. These are shown as warnings in the Swift 4.1 compiler and may become errors for all language modes in future versions of the compiler.

For example, the compiler now warns about overlapping accesses to the variable “value”:


1
2
3
4
<span class="hljs-keyword">var</span> value = <span class="hljs-number">7</span>
<span class="hljs-built_in">withUnsafeMutablePointer</span>(to: &amp;value) {
$<span class="hljs-number">0</span>.pointee = value + <span class="hljs-number">1</span>
}

One way to avoid the warning is to make a copy of the local variable before passing it as inout:


1
2
3
4
5
<span class="hljs-keyword">var</span> value = <span class="hljs-number">7</span>
<span class="hljs-keyword">let</span> valueCopy = value
<span class="hljs-built_in">withUnsafeMutablePointer</span>(to: &amp;value) {
 $<span class="hljs-number">0</span>.pointee = valueCopy + <span class="hljs-number">1</span>
}

Another way is to refer to the variable using a closure parameter instead of capturing it:


1
2
3
4
<span class="hljs-keyword">var</span> value = <span class="hljs-number">7</span>
<span class="hljs-built_in">withUnsafeMutablePointer</span>(to: &amp;value) {
 $<span class="hljs-number">0</span>.pointee = $<span class="hljs-number">0</span>.pointee + <span class="hljs-number">1</span>
}

Developer tools in xcode 9.3

Accessing Additional Developer Tools

To launch additional developer tools, such as Instruments and FileMerge, launch Xcode-beta and select Xcode > Open Developer Tool. You can keep these additional tools in your Dock for direct access when Xcode isn’t running.

Technical Support and Learning Resources

Apple provides the following web resources to support your development with Xcode:

  • Apple Developer Forums. Participate in discussions about developing for Apple platforms and using developer tools.
  • Bug Reporter. Report issues, enhancement requests, and feedback to Apple. Provide detailed information, including the system and developer tools version information, and any relevant crash logs or console messages.
  • Apple Developer website. Get the latest development information as well as technical
    documentation for Xcode.
  • Xcode homepage. Get high-level information about the latest release of Xcode. Download
    current and beta Xcode releases.
  • For help with using Xcode, use the built-in help by choosing Help > Xcode Help.

Ref  Apple updates

Related Post

Use of CollectionViewDataSource method moveItemAt ... Use of CollectionViewDataSource method moveItemAt for Reordering CollectionView cell In IOS (Swift 4) In this tutorial we are study about how we can ...
Drag and Drop Collection View cell in IOS 11 &... Drag and Drop Collection View cell in IOS 11 & swift 4 In this tutorial we are explain how to drag and drop collection view cell in two collectio...
Control Flow Statements | Swift tutorial Control Flow : Swift tutorial Swift Provides diffrent type of controll flow statements like: Loops Statements : Loops are used for perform the t...
Data Type And Storage And Keywords To store data inside the computer we need to first identify the type of data elements we need in our program. There are several different types of dat...
Getting started with C Getting started with C : If we want to communicate with our computer it is very much needed that our computer understands what we want to say to it. ...
Compile C/C++ program (Dev-C/C++) what is Dev-C/C++? Dev-C/C++, developed by Bloodshed Software, is a fully featured graphical IDE(Integrated Development Environment),which ...

Leave a Reply

Your email address will not be published. Required fields are marked *