xcode9 新功能

作者: 阿狸先森丶12138 | 来源:发表于2017-06-06 10:00 被阅读885次

翻译篇:http://blog.csdn.net/sinat_23907467/article/details/72875277

What's New in Xcode 9

Xcode is the complete developer toolset used to create apps for Apple TV, Apple Watch, iPad, iPhone, and Mac. The Xcode development environment bundles the Instruments analysis tool, Simulator, and the OS frameworks in the form of tvOS SDKs, watchOS SDKs, iOS SDKs, and macOS SDKs.

Highlights of Xcode 9

Xcode 9 includes overall quality improvements as well as extensive new features.

All new editor.Fast, structure-based editor that lets you intelligently highlight and navigate your code. Includes great Markdown support.

Refactoring.Refactoring built right into the editing experience and works across Swift, Objective-C, Interface Builder, and many other file types.

Super-fast search.The Find navigator returns results instantly.

Debugging.Wirelessly debug iOS and tvOS devices over the network, new debuggers for Metal, and more features throughout Xcode.

Source Control.All new source control navigator and integrated support for GitHub accounts for quickly browsing repositories and pushing your repositories to the cloud.

Xcode Server built-in.Continuous integration bots can be run on any Mac with Xcode 9, no need to install macOS Server.

New Playground templates.Includes iOS templates designed to run well in both Xcode and Swift Playgrounds in iPad.

New Build System.An opt-in preview of Xcode's new build system provides improved reliability and performance.

General

Updated way to define text macros using a plist file.

Define text macros for a user, a project, or a specific user in a project.

Customize the new file header. For more information, see Customizing file headers in Xcode Help.

For more information, see Xcode Help.

Updated the indexing engine including the ability to index files as they are compiled.

Devices window is split into separate panes for devices and simulators.

Asset Catalogs

Named colors support.

Added wide gamut app icons.

Added a larger iOS marketing to the App Icon set.

Added option to preserve image vector data for matching Dynamic Type scaling.

Added support for HEIF images.

Building and Linking

New in Xcode 9 – New build system.

Added a preview of a new build system written in Swift.

Provides higher reliability.

Catches many project configuration problems.

Improves overall build-system performance.

Note, build system performance does not include the compilers, linkers, and other tools used by the build system.

Currently optional and will become the default in a future version of Xcode.

To opt into the new build system for a project or workspace, choose File > Project Settings or File > Workspace Settings, and then choose New Build System (Preview) for the Build System type.

For notes on compatibility with existing projects, see the Xcode Release Notes.

Capabilities

New configurations for iOS hotspot and for multipath-TCP.

New network configurations including content filtering, proxying DNS queries, and proxying TCP and UDP connections.

New background mode for watchOS for use with audio recording and turn-by-turn directions.

New mode for tvOS background fetch.

Core ML

New in Xcode 9 – Core ML editor.

Generate strongly typed interfaces for the model.

Model compilation for on-device usage.

Debugging

New in Xcode 9 – Network debugging for iOS and tvOS devices.

Debug iOS and tvOS devices over WiFi or wired networks.

Connect via Bonjour or enter an IP address.

iOS devices need to be plugged-in once to enable network debugging.

New in Xcode 9 – GPU frame capture and GPU overrides.

View command buffers, attachments, resources, and call stacks.

Modify shaders and save changes to your app.

Move through the timeline for the sequence.

Inspect and modify values for individual pixels in attachments including color values, alpha, depth, and more.

Experiment with the rendering state without modifying code by minimizing texture bandwidth, minimizing number of rendered pixels, disabling the blending stage, showing only the wireframe, and scaling the amount of tessellation.

New in Xcode 9 – Undefined Behavior Sanitizer.

Use theUndefined Behavior Sanitizerto find sources of program crashes, unexpected behaviors, and incompatibilities with future versions of Xcode.

Detect several types of undefined behaviors in C languages such as integer overflow, invalid casts, and alignment violations.

Enable the Undefined Behavior Sanitizer in the Diagnostics pane of the scheme editor.

New in Xcode 9 – Main Thread Checker.

Detects AppKit, UIKit, and WebKit method calls that are not made on the main thread.

Automatically enabled during debugging, and can be disabled in the Diagnostic tab of the scheme editor.

Main Thread Checkerworks with Swift and C languages.

Enhanced the Breakpoint navigator with deep filtering.

Added visual indicators for modified breakpoints.

Extended the view debugger to show view controllers, and to work with SceneKit and SpriteKit views.

Enhanced iOS energy gauge.

Documentation

New unified browser that integrates reference, sample code, and articles.

Improved documentation search.

New jump bar for navigating between pages.

Integrated sample code downloading.

Instruments

New split view for pinning graphs in the graphing area of a trace document.

Added an All strategy and moved the strategy picker to a new toolbar at the top of the trace document.

Enhanced Metal debugging instrument.

Metal system trace VR support for viewing events such as compositor activity, pose queries, and more

Interface Builder

Added support for using named colors from the asset catalog.

Added support for the new margin and baseline view constraints.

Added support for auto layout safe-area guides.

Added support for full screen watchOS apps.

Metal 2 Support

New in Xcode 9 - Capture API.

Define explicit capture boundaries in your code.

Use the newMTLCaptureManagerclass and the newMTLCaptureScopeprotocol to set, manage, and trigger capture boundaries programatically.

Use the extended Xcode GPU Capture UI to start and stop captures manually. You can also use Xcode to capture API boundaries defined in your app.

New in Xcode 9 - GPU Counters.

Analyze detailed profiling metrics about a specific GPU capture. In iOS and tvOS, GPU counters are shown as a timeline of command encoders; in macOS, GPU counters are shown as a timeline of draw or dispatch calls.

Examine runtime performance of render or compute pipeline stages, such as the vertex shader, fragment shader, compute kernel, and more.

Compare the amount of GPU time spent in each pipeline stage to find your performance bottlenecks.

New in Xcode 9 - GPU Remarks.

Find optimization opportunities in your Metal shading language code.

Debug device-specific runtime issues in the shader editor.

Follow direct resolutions and instructions to improve your code.

New in Xcode 9 - Smart Filtering.

Find specific debug information by typing into the debug navigator. Xcode dynamically displays suggestions as you type and highlight matching text, such as resources, pixel formats, function names, object labels, and more.

Filter search results by selecting options from a pre-defined menu of Metal objects.

Use multiple filters with many matching conditions.

New in Xcode 9 - VR Support.

View VR submissions and left-eye/right-eye submitted surfaces.

Added texture inspection for inspecting values of individual pixels in render targets, such as color, alpha, depth, and more.

Added inspecting output vertex attributes to the buffer editor.

Added data tips support for Metal objects such as textures, buffers and samplers.

Refactoring

Global rename across Swift, C, Objective-C, and C++ files.

View all the changes in one place.

Converts method signatures between Swift and Objective-C formats.

Updates properties, getters, setters, and synthesized iVars as needed.

One button change.

Fix-it automatically fills in missing cases in switch statements, and mandatory methods for protocol conformance with one click.

Extract method functionality for all supported languages, along with other language-specific local refactoring.

Simulator

New in Xcode 9 - Multiple concurrent simulators.

Run multiple simulators at the same time.

Run more tests in parallel.

Test synching and other multi-device workflows.

New chrome for iOS and watchOS simulators includes the hardware controls, and allow easy dragging and resizing of the simulated device.

Share information with Simulator from Maps, Photos, and Safari.

Added option to keep simulators running after closing the window or quitting Simulator for better integration with thesimctlcommand of thexcruncommand line tool.

Record videos of simulators.

Get help by choosing Help > Simulator Help.

Source Control

New source control navigator for viewing branches, tags, and remote repositories for the current workspace.

New source control inspector shows details for the selected navigator item.

New editor for branch history including a jump bar for easy navigation.

New side-by-side editor for file diffs.

Easier and faster access to common tasks.

GitHub account integration for easy browsing and one-click creation of a project and the associated GitHub repository.

Source Editing

New in Xcode 9 – All new source editor.

Faster and more versatile Find and replace.

Fast scrolling for any sized file.

Direct manipulation of code structure such as tokens and blocks.

Redesigned integration for source control.

Redesigned presentation of error and warning messages.

Support for Markdown.

Swift

New in Xcode 9 – Swift 4.

One compiler for Swift 4 and Swift 3, Swift 4 and Swift 3 targets can be compiled together in the same project.

Improved migrator experience that supports migrating only select targets to Swift 4.

Faster generic code and decreased code size.

Testing

New in Xcode 9 – Parallel device testing.

Added new APIs to XCTest.

Control and capture screenshots.

Group test activities.

Test attachments.

Cleanup test state in a teardown block.

Target multiple apps in one UI test.

Run tests using a specified language and region.

Xcode Server

New in Xcode 9 - Built in Xcode Server.

New Server & Bots pane in Preferences for configuring Xcode Server and for setting Bot permissions.

Added support for 2-factor authentication.

Updated functionality for bots.

Support automatic and manual provisioning workflows.

Pass additional arguments toxcodebuild.

Run tests in parallel on devices and Simulator.

Configure language and region for tests.

Send "all clear" emails notifications.

Compatibility

Xcode 9.0 requires a Mac running macOS Sierra 10.12.4 or later.

Installation

Xcode 9 beta can coexist with previous versions of Xcode.

Prerelease versions of Xcode are made available fromdeveloper.apple.comto authorized seed developers, packaged in a compressed XIP file. To install Xcode during the beta period, download the XIP file, drag it to the Applications folder, then double-click the file. The XIP file expands in place.

Note:If you have enabled “Open ‘safe’ files after downloading” in Safari Preferences, the XIP file downloads and is automatically expanded in your download file folder. Drag Xcode-beta to the Applications folder before launching it.

Upon final release, Xcode is installed via the Mac App Store.

Developer Resources

The Apple Developer Program provides access to the App Store, Mac App Store, and Apple TV App Store, additional support and documentation, and signing resources for testing and deployment on Apple TV, Apple Watch, iPad, iPhone, and iPod touch devices. For more information, visit theApple Developer Program website.

VisitApple Developer Forumsfor discussions about any Apple developer software, including prerelease products.

For the latest security information, visithttps://support.apple.com/kb/HT1222.

About SDKs and Simulator

A software development kit (SDK) is a collection of frameworks (libraries, headers, and resources) that represent the API for a specific watchOS, iOS, or macOS version. Most of the functionality your app gets from an SDK is actually provided by the host operating system, which makes the right Base SDK and OS Deployment Target settings that are critical for app compatibility. Xcode automatically builds with the latest SDK and targets the latest OS.

If your app doesn’t require the latest OS features, you can configure it to run on a previous version of the platform operating system using the OS Deployment Target option in the Xcode Project settings. If your project was created in an older version of Xcode, you can let Xcode update your project. For details on this feature, seeProject Modernization.

Important:Before submitting your app to the App Store, you must test on a device running your supported target OS version or versions.

Automatic Signing

Changes to the signing processes may impede your development if you're working on an older project that has not been updated to the current signing process.

The recommended approach for both enterprise and App Store developer accounts is to use automatic signing in Xcode to code sign apps during both development and distribution. See Xcode Help for documentation on automatic signing. If you have an older project that is not configured to use automatic signing, readTechnical Q&A (QA1814) "Setting up Xcode for Automatic Provisioning"to learn the procedure enabling you to reconfigure your Xcode project.

Automatic signing should be considered before using other techniques, but if your projects do require manual signing, search for “manually sign” in Xcode Help to review current manual signing practices.

Project Modernization

When you open a project, Xcode evaluates it to see whether any settings should be updated. This feature provides an easy way to make sure your projects conform to the latest SDKs and best practices.

Open the issue navigator to see whether anything in your project needs to be updated. You can also select the project in the project navigator, and then choose Editor > Validate Settings.

If the issue navigator lists modernization issues, click the issue to see a dialog that explains the updates that should be made and that lets you perform any or all of them.

After you have clicked Perform Changes, regardless of whether you choose to make all the changes, Xcode does not show the warning again. To rerun the check, select your project in the project navigator and choose Editor > Validate Settings.

See Also

To learn more about using Xcode, choose Help > Xcode Help.

相关文章

  • iOS 11无线测试--Get新技能

    设备环境:Mac OSX 10.12.5、iOS11、Xcode9 PS:这是WWDC2017的新功能,iOS11...

  • iOS11使用Xcode进行iOS设备无线调试

    设备环境:Mac OSX 10.12.5、iOS11、Xcode9 PS:这是WWDC2017的新功能,iOS11...

  • 使用Xcode进行iOS设备无线调试

    设备环境:Mac OSX 10.12.5、iOS11、Xcode9 PS:这是WWDC2017的新功能,iOS11...

  • Xcode9 新功能

    文章原地址:xcode9新功能点击打开原地址 Xcode是用于为Apple TV,Apple Watch,iPad...

  • Xcode9新功能

    1. 升级到Xcode9.0之后,可以通过Wifi连接iOS或tvOS设备进行无线调试。 要求: Xcode ...

  • xcode9 新功能

    翻译篇:http://blog.csdn.net/sinat_23907467/article/details/7...

  • Xcode9新功能介绍

    原文链接

  • color set

    color set 是Xcode9新功能,适用于iOS 11优点:终于可以在IB中使用设定的颜色了 添加颜色ac_...

  • Xcode9无线调试

    Xcode9的新功能:无线调试功能 确保电脑和手机处于同一个 wifi 下, 手机系统是 iOS11 + 通过数据...

  • Xcode无线调试

    Xcode无线调试是WWDC2017的一个新功能,首先要满足iOS11以上,Xcode9以上; 首先,把iOS11...

网友评论

本文标题:xcode9 新功能

本文链接:https://www.haomeiwen.com/subject/dqrgfxtx.html