正在載入此比較的其餘部分。

Untitled diff

建立於 差異永不過期
18 刪除
196 行
20 新增
198 行
Xcode 11 Beta 4 Release Notes
Xcode 11 Beta 5 Release Notes
Update your apps to use new features, and test your apps against API changes.
Update your apps to use new features, and test your apps against API changes.
Overview
Overview
Xcode 11 includes SDKs for iOS 13, macOS Catalina 10.15, watchOS 6, and tvOS 13. Xcode 11 supports on-device debugging for iOS 8 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 11 requires a Mac running macOS Mojave 10.14.4 or later.
Xcode 11 includes SDKs for iOS 13, macOS Catalina 10.15, watchOS 6, and tvOS 13. Xcode 11 supports on-device debugging for iOS 8 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 11 requires a Mac running macOS Mojave 10.14.4 or later.
General
General
New Features
New Features
Xcode 11 beta supports development with SwiftUI.
Xcode 11 beta supports development with SwiftUI.
Note
Note
Tools for SwiftUI development are only available when running on macOS Catalina 10.15 beta.
Tools for SwiftUI development are only available when running on macOS Catalina 10.15 beta.
You can now change the appearance of Xcode independently of the system appearance setting. (41165587)
You can now change the appearance of Xcode independently of the system appearance setting. (41165587)
Xcode supports uploading apps from the Organizer window or from the command line with xcodebuild or xcrun altool. Application Loader is no longer included with Xcode. (29008875)
Xcode supports uploading apps from the Organizer window or from the command line with xcodebuild or xcrun altool. Application Loader is no longer included with Xcode. (29008875)
LaunchServices on macOS now respects the selected Xcode when launching Instruments, Simulator, and other developer tools embedded within Xcode. For example, when you double-click an Instruments trace in Finder, the version of Instruments for the selected Xcode launches. Change which Xcode is used with xcode-select from the command line. (6757601)
LaunchServices on macOS now respects the selected Xcode when launching Instruments, Simulator, and other developer tools embedded within Xcode. For example, when you double-click an Instruments trace in Finder, the version of Instruments for the selected Xcode launches. Change which Xcode is used with xcode-select from the command line. (6757601)
Editors can be added to any window without needing the Assistant Editor. Editors are added using the “Add Editor” button in the jump bar or the File > New > Editor command. Each editor can now be in one of three modes: “Editor Only”, “Editor and Assistant” or “Editor and Canvas”. The latter two modes automatically show relevant content when available. When using multiple editors, the View > Editor > Focus command can be used to temporarily expand the active editor to fill the entire window, hiding other editors. For source control support, the Code Review button in the Toolbar replaces the Comparison Editor. The “Show Authors” command is now available from the Source Editor’s Editor menu. The SCM Log is now in the Inspector Area. (43806898)
Editors can be added to any window without needing the Assistant Editor. Editors are added using the “Add Editor” button in the jump bar or the File > New > Editor command. Each editor can now be in one of three modes: “Editor Only”, “Editor and Assistant” or “Editor and Canvas”. The latter two modes automatically show relevant content when available. When using multiple editors, the View > Editor > Focus command can be used to temporarily expand the active editor to fill the entire window, hiding other editors. For source control support, the Code Review button in the Toolbar replaces the Comparison Editor. The “Show Authors” command is now available from the Source Editor’s Editor menu. The SCM Log is now in the Inspector Area. (43806898)
Known Issues
Known Issues
Xcode 11 doesn’t support working with SwiftUI in a Mac Catalyst app. (41416222, 51201699)
Xcode 11 doesn’t support working with SwiftUI in a Mac Catalyst app. (41416222, 51201699)
Resolved Issues
Resolved Issues
The required packages installer no longer unnecessarily appears on macOS 10.15. (51080815)
The required packages installer no longer unnecessarily appears on macOS 10.15. (51080815)
The Foundation integration for the Combine framework is now available. The following Foundation and Grand Central Dispatch integrations with Combine are available: KeyValueObserving, NotificationCenter, RunLoop, OperationQueue, Timer, URLSession, DispatchQueue, JSONEncoder, JSONDecoder, PropertyListEncoder, PropertyListDecoder, and the @Published property wrapper. (51241500)
The Foundation integration for the Combine framework is now available. The following Foundation and Grand Central Dispatch integrations with Combine are available: KeyValueObserving, NotificationCenter, RunLoop, OperationQueue, Timer, URLSession, DispatchQueue, JSONEncoder, JSONDecoder, PropertyListEncoder, PropertyListDecoder, and the @Published property wrapper. (51241500)
Issue text is no longer light when using a light theme with a dark system appearance. (48230278)
Issue text is no longer light when using a light theme with a dark system appearance. (48230278)
Apple Clang Compiler
Apple Clang Compiler
New Features
New Features
Clang now provides a mechanism for controlling exit-time destructor registration. You can disable these globally with the flag -fno-c++-static-destructors, or apply the attribute [[clang::no_destroy]] to disable the destructors of specific variables. The attribute [[clang::always_destroy]] was also added to enable destructors of specific variables when -fno-c++-static-destructors is used. (21734598)
Clang now provides a mechanism for controlling exit-time destructor registration. You can disable these globally with the flag -fno-c++-static-destructors, or apply the attribute [[clang::no_destroy]] to disable the destructors of specific variables. The attribute [[clang::always_destroy]] was also added to enable destructors of specific variables when -fno-c++-static-destructors is used. (21734598)
As an extension, C++11 enums with fixed underlying types are now supported in all language modes. (43831380)
As an extension, C++11 enums with fixed underlying types are now supported in all language modes. (43831380)
Deprecation warnings will be issued when standard library facilities that were deprecated in the active Standard version are used. (46881474)
Deprecation warnings will be issued when standard library facilities that were deprecated in the active Standard version are used. (46881474)
Stack checking is on by default on all platforms to prevent memory corruptions. (25859140)
Stack checking is on by default on all platforms to prevent memory corruptions. (25859140)
The machine code outliner is on by default under -Oz. It reduces code size by identifying identical code sequences across functions. Such sequences are encapsulated (“outlined”) in a single compiler generated function. Each original code sequence is replaced with a call to that outlined function. (46385499)
The machine code outliner is on by default under -Oz. It reduces code size by identifying identical code sequences across functions. Such sequences are encapsulated (“outlined”) in a single compiler generated function. Each original code sequence is replaced with a call to that outlined function. (46385499)
In order to improve performance and security the static linker (ld) now moves globals that are marked as constant into a new segment: __DATA_CONST. These globals may consist of compiler generated pointers that the dynamic linker (dyld) needs to fix up during load, but are otherwise constant such as vtables and explicitly declared constant pointers. Once dyld has finished loading the image it makes __DATA_CONST readonly. This change doesn’t impact well behaved code, but may break code that depends on undefined behavior such as using a type pun to write to a pointer that’s declared as const. (50898833)
In order to improve performance and security the static linker (ld) now moves globals that are marked as constant into a new segment: __DATA_CONST. These globals may consist of compiler generated pointers that the dynamic linker (dyld) needs to fix up during load, but are otherwise constant such as vtables and explicitly declared constant pointers. Once dyld has finished loading the image it makes __DATA_CONST readonly. This change doesn’t impact well behaved code, but may break code that depends on undefined behavior such as using a type pun to write to a pointer that’s declared as const. (50898833)
static int value1 = 0; // Stored in __DATA
static int value1 = 0; // Stored in __DATA
static int value2 = 0; // Stored in __DATA
static int value2 = 0; // Stored in __DATA
const int * const valuePtr = &value1; // Stored in __DATA_CONST
const int * const valuePtr = &value1; // Stored in __DATA_CONST


// ERROR: Attempting to store a value to a constant pointer
// ERROR: Attempting to store a value to a constant pointer
(int *)valuePtr = &value2;
(int *)valuePtr = &value2;
Clang now supports the C++17 <filesystem> library for iOS 13, macOS 10.15, watchOS 6, and tvOS 13. (50988273)
Clang now supports the C++17 <filesystem> library for iOS 13, macOS 10.15, watchOS 6, and tvOS 13. (50988273)
Known Issues
Known Issues
When using manual retain-release, exceptions thrown from the following methods or any functions or methods they transitively call might not be caught: release, autorelease, retain, alloc, or allocWithZone. (50253394)
When using manual retain-release, exceptions thrown from the following methods or any functions or methods they transitively call might not be caught: release, autorelease, retain, alloc, or allocWithZone. (50253394)
Resolved Issues
Resolved Issues
An if (@available( … )) check works properly when linked by Xcode into an app or framework that’s running on iOS 13, macOS 10.15, watchOS 6, or tvOS 13. (51109405)
An if (@available( … )) check works properly when linked by Xcode into an app or framework that’s running on iOS 13, macOS 10.15, watchOS 6, or tvOS 13. (51109405)
The <experimental/optional> and <experimental/variant> headers are removed. Use <optional> and <variant> from C++17 instead. (50175894)
The <experimental/optional> and <experimental/variant> headers are removed. Use <optional> and <variant> from C++17 instead. (50175894)
Resolved a long compile-time issue in the loop-invariant code motion pass of the optimizer. (39648918)
Resolved a long compile-time issue in the loop-invariant code motion pass of the optimizer. (39648918)
Asset Catalog
Asset Catalog
New Features
New Features
Assets can now be cut, copied, pasted, and duplicated using the menu or keyboard shortcuts. (27107912)
Assets can now be cut, copied, pasted, and duplicated using the menu or keyboard shortcuts. (27107912)
Known Issues
Known Issues
Your app might fail to build if it contains a launch image. The failure message resembles the following: “The launch image set named <image set name> did not have any applicable content.” Launch images are deprecated and should be removed; use a launch storyboard or .xib file instead. (50210495)
Workaround: Clear the build setting ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME.
Localized assets in an asset catalog aren’t matched to the user-preferred languages and locales. (49565973)
Localized assets in an asset catalog aren’t matched to the user-preferred languages and locales. (49565973)
Resolved Issues
Resolved Issues
Xcode no longer crashes if you press Command-U or select an asset catalog in the navigator area. (52211868)
Xcode no longer crashes if you press Command-U or select an asset catalog in the navigator area. (52211868)
Fixed a crash that could occur when using Interface Builder’s image inspector if the asset catalog contained a symbol and bitmap image assets with the same name. (51279661)
Fixed a crash that could occur when using Interface Builder’s image inspector if the asset catalog contained a symbol and bitmap image assets with the same name. (51279661)
New user-defined images added to the asset catalog show up in the image view image combo box. (51090225, 51120715)
New user-defined images added to the asset catalog show up in the image view image combo box. (51090225, 51120715)
Corrected an issue that caused the NSDataAsset asset variation for Mac Catalyst to return nil at runtime. (50022757)
Corrected an issue that caused the NSDataAsset asset variation for Mac Catalyst to return nil at runtime. (50022757)
Resolved an issue that caused NSDataAsset asset lookup to return the wrong data when an asset had variants specified for iPad and Mac Catalyst. (49990047, 51278348, 51288447)
Resolved an issue that caused NSDataAsset asset lookup to return the wrong data when an asset had variants specified for iPad and Mac Catalyst. (49990047, 51278348, 51288447)
Build System
Build System
New Features
New Features
If tests are run using a test plan, it’s now possible to configure which targets should be included in code coverage results using the test plan’s code coverage setting. (50502861)
Xcode uses response files by default to pass input files to the Swift compiler. To turn this behavior off, set USE_SWIFT_RESPONSE_FILE to NO.
You can use an unlimited number of Swift files in a target if you set the build setting USE_SWIFT_RESPONSE_FILE to YES. (35879960)
You can use an unlimited number of Swift files in a target. (35879960)
Run script phases and custom build rules may declare and emit a dependencies file, in the Makefile-style .d format output used by some compilers and build tools. The build system checks the files listed for changes during subsequent builds when determining if the rule or phase should be executed. (49226986)
Run script phases and custom build rules may declare and emit a dependencies file, in the Makefile-style .d format output used by some compilers and build tools. The build system checks the files listed for changes during subsequent builds when determining if the rule or phase should be executed. (49226986)
Projects may now use custom build rules to process header files (APPLY_RULES_IN_COPY_HEADERS). (48185100)
Projects may now use custom build rules to process header files (APPLY_RULES_IN_COPY_HEADERS). (48185100)
Custom build rules can now specify additional, static input files that are used during execution. These resolved input file paths are supplied to rule scripts using the SCRIPT_INPUT_FILE_# environment variables. (49645853)
Custom build rules can now specify additional, static input files that are used during execution. These resolved input file paths are supplied to rule scripts using the SCRIPT_INPUT_FILE_# environment variables. (49645853)
Xcode removes some entries from the Info.plist file of a product at build time if the entries are not appropriate for the platform being built for, which is useful for targets which are configured to build for multiple platforms. This behavior can be disabled by setting the build setting DISABLE_INFOPLIST_PLATFORM_PROCESSING to YES, in which case the target must assume the responsibility of managing these entries appropriately. (47797497)
Xcode removes some entries from the Info.plist file of a product at build time if the entries are not appropriate for the platform being built for, which is useful for targets which are configured to build for multiple platforms. This behavior can be disabled by setting the build setting DISABLE_INFOPLIST_PLATFORM_PROCESSING to YES, in which case the target must assume the responsibility of managing these entries appropriately. (47797497)
Custom build rules can now declare that they should run once per architecture (the default), or run only once across all architectures. This is useful for custom rules which are architecture-neutral, for example, code generation tools that generate files that don’t differ per architecture. (47716990)
Custom build rules can now declare that they should run once per architecture (the default), or run only once across all architectures. This is useful for custom rules which are architecture-neutral, for example, code generation tools that generate files that don’t differ per architecture. (47716990)
XCFramework make it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and Mac Catalyst — into a single distributable .xcframework bundle that your developers can use within their own applications. An .xcframework bundle can be added to an Xcode target’s Link Libraries phase and Xcode uses the right platform’s version of the included framework or library at build time. Creation of frameworks is supported from the command line using xcodebuild -create-xcframework. Frameworks or libraries bundled in an XCFramework should be built with the Build Libraries for Distribution build setting set to YES. (49948269)
XCFramework make it possible to bundle a binary framework or library for multiple platforms —including iOS devices, iOS simulators, and Mac Catalyst — into a single distributable .xcframework bundle that your developers can use within their own applications. An .xcframework bundle can be added to an Xcode target’s Link Libraries phase and Xcode uses the right platform’s version of the included framework or library at build time. Creation of frameworks is supported from the command line using xcodebuild -create-xcframework. Frameworks or libraries bundled in an XCFramework should be built with the Build Libraries for Distribution build setting set to YES. (49948269)
Known Issues
Known Issues
Watch targets that override the Architectures build setting to just armv7k may fail to process in TestFlight and Xcode’s enterprise distribution workflow. (51104990)
Workaround: Build the watchOS app with armv7k and arm64_32.
Incremental builds to may fail to codesign properly for non-source related changes to your project, such as resource file modifications, which can result in the app failing to launch. (41254808)
Incremental builds to may fail to codesign properly for non-source related changes to your project, such as resource file modifications, which can result in the app failing to launch. (41254808)
Workaround: Change a source file within the same target to trigger the codesign process, or perform a clean build.
Workaround: Change a source file within the same target to trigger the codesign process, or perform a clean build.
Updating your iOS app for Mac Catalyst might show new error diagnostics stating that certain frameworks or functionality is not available on the Mac. If one of these diagnostics is shown erroneously, you can disable it by setting the VALIDATE_WORKSPACE build setting to NO. (50607174)
Updating your iOS app for Mac Catalyst might show new error diagnostics stating that certain frameworks or functionality is not available on the Mac. If one of these diagnostics is shown erroneously, you can disable it by setting the VALIDATE_WORKSPACE build setting to NO. (50607174)
The new build system doesn’t evaluate a leading tilde (~) in paths in build settings to the user’s home directory. (41339901)
The new build system doesn’t evaluate a leading tilde (~) in paths in build settings to the user’s home directory. (41339901)
Workaround: Use $(HOME) instead.
Workaround: Use $(HOME) instead.
If a target enables RUN_CLANG_STATIC_ANALYZER, then single file processing commands — such as Compile, Preprocess, Show Assembly — won’t work correctly because they generate the static analyzer output file rather than the appropriate output. (43340227)
If a target enables RUN_CLANG_STATIC_ANALYZER, then single file processing commands — such as Compile, Preprocess, Show Assembly — won’t work correctly because they generate the static analyzer output file rather than the appropriate output. (43340227)
Workaround: Disable RUN_CLANG_STATIC_ANALYZER in the target.
Workaround: Disable RUN_CLANG_STATIC_ANALYZER in the target.
If the build of an app-hosted test target — where TEST_HOST is defined — fails, subsequent builds may fail when signing the app product because the test target is incomplete and unsigned when the initial signing of the app occurs. (43402096)
If the build of an app-hosted test target — where TEST_HOST is defined — fails, subsequent builds may fail when signing the app product because the test target is incomplete and unsigned when the initial signing of the app occurs. (43402096)
Workaround: Perform a clean build. Or, manually delete the unsigned test bundle from inside the app target’s product and rebuild.
Workaround: Perform a clean build. Or, manually delete the unsigned test bundle from inside the app target’s product and rebuild.
Targets which override the Architectures and Valid Architectures build settings for iOS may need to remove or conditionalize the overrides to build correctly for Mac Catalyst. (51074742)
Targets which override the Architectures and Valid Architectures build settings for iOS may need to remove or conditionalize the overrides to build correctly for Mac Catalyst. (51074742)
When using Xcode on macOS 10.15, some files — especially .xib files and storyboard files — might be copied rather than compiled, resulting in an incorrect build product. (49351105)
When using Xcode on macOS 10.15, some files — especially .xib files and storyboard files — might be copied rather than compiled, resulting in an incorrect build product. (49351105)
Workaround: In the File Inspector for the file which is being copied, toggle the Type popup away from Default - <some type> then back to Default. This resets the file type in the project file to the correct type and enables the build system to match it to the correct tool to process it.
Workaround: In the File Inspector for the file which is being copied, toggle the Type popup away from Default - <some type> then back to Default. This resets the file type in the project file to the correct type and enables the build system to match it to the correct tool to process it.
When building for the first time users may get a popup stating that SimulatorTrampoline would like access to Desktop Files because ibtool running in simulator needs access to these files to compile storyboards. (51114450)
When building for the first time users may get a popup stating that SimulatorTrampoline would like access to Desktop Files because ibtool running in simulator needs access to these files to compile storyboards. (51114450)
Workaround: Allow access to the files in the prompt.
Workaround: Allow access to the files in the prompt.
Some features that aren’t supported by the legacy build system are ignored instead of emitting an error. This includes use of build rule or script phase dependency files, input declarations for custom build rules, and the APPLY_RULES_IN_COPY_HEADERS build setting. (51318274)
Resolved Issues
Resolved Issues
When tests are run under multiple configurations using a test plan in Xcode Server, the integration report now properly displays the name of each configuration that a test ran under. (53402104)
If changes are made to the active test plan document while the test navigator is visible — such as the addition or removal of a test target, or enabling or disabling an individual test or test class — the navigator now updates immediately in response to the changes instead of becoming out of sync with the test plan. (52065983)
If the settings in the active test plan document are modified, and the Test Again action is subsequently invoked to rerun the tests that were last run, the modified settings will now take effect instead of the previous settings being used. (51145300)
On-Demand Resources (ODR) are now supported on macOS. (50358184)
Use of legacy build system features such as build rule or script phase discovered dependency files, input declarations for custom build rules, or the APPLY_RULES_IN_COPY_HEADERS build setting produces an error instead of silently being ignored. (51318274)
Overriding the Architectures build setting to just armv7k in a Watch targets doesn’t prevent deployment to TestFlight or Xcode’s enterprise distribution workflow. (51104990)
The indexer doesn’t wait for a build to be performed before indexing Swift response files. (52110336)
The indexer doesn’t wait for a build to be performed before indexing Swift response files. (52110336)
After closing and reopening a project, or when performing incremental builds using xcodebuild, diagnostics from prior builds regarding incompatible frameworks, app extensions, and code signing settings now are displayed with a description in the Issue Navigator and Build Log. (51131884)
After closing and reopening a project, or when performing incremental builds using xcodebuild, diagnostics from prior builds regarding incompatible frameworks, app extensions, and code signing settings now are displayed with a description in the Issue Navigator and Build Log. (51131884)
By default, Xcode’s new build system doesn’t detect changes in directories declared as inputs to shell script build phases. Enabling the build setting ALLOW_RECURSIVE_SCRIPT_INPUTS causes it to do so. However, if any of the files inside such a directory are generated by a task that depends on the output of the script phase, then a dependency cycle error is emitted and must be resolved by restructuring the target. (41126633)
By default, Xcode’s new build system doesn’t detect changes in directories declared as inputs to shell script build phases. Enabling the build setting ALLOW_RECURSIVE_SCRIPT_INPUTS causes it to do so. However, if any of the files inside such a directory are generated by a task that depends on the output of the script phase, then a dependency cycle error is emitted and must be resolved by restructuring the target. (41126633)
The build system no longer crashes when building some targets that use On Demand Resources. (49072702)
The build system no longer crashes when building some targets that use On Demand Resources. (49072702)
Command Line Tools
Command Line Tools
Resolved Issues
Resolved Issues
The python3 and pip3 commands no longer incorrectly fail with an error that claims they require Xcode when only the Command Line Tools are installed. (53284703)
pip3 is available using the default shell PATH when using macOS Catalina 10.15 beta 4. (50877974)
pip3 is available using the default shell PATH when using macOS Catalina 10.15 beta 4. (50877974)
Python 3 is available in the Command Line Tools package. (51727440)
Python 3 is available in the Command Line Tools package. (51727440)
Core Data
Core Data
New Features
New Features