New Features in Xcode 6

 

Xcode6包括Swift,一个新的编程语言,新的交互工作区称为操场。开发者可以直接操作并体验到,在游乐场中即使生成类型的代码的贝塞尔路径,然后观察到路径通过代码直接绘制出来。完美的新代码在游乐场,然后更容易将代码提到主项目中。

Xcode 6 includes Swift, an innovative new programming language, with a new interactive work area called a playground. Developers can directly manipulate and experiment with Swift code live—type the code for a bezier path in the playground and watch the path drawn directly beside the code. Perfect new code within the playground, then easily promote that code into your main project.

Xcode6扩展了Xcode的功能系列,用活生生的可视化功能。例如,视图调试来暂停一个运行中的应用,然后让所有UI曾的控件爆炸成3D视图,这样可以更容易理解接口是如何绘制出来的。通过界面创建器实时渲染展示出UI设计的对应的代码,这样以来,你就可以编辑视图的代码,相应的IB渲染也会随之改变。只需要点击鼠标就可以展示预览视图的不同语言版本。

Xcode 6 extends the Xcode feature set with new live visualization capabilities. For example, view debugging pauses a running application and then explodes all the UI layers into a 3D visualization, making it easy to understand how the interface is drawn. Live rendering within Interface Builder displays your handwritten UI code as you design, so that you can edit your view’s code and the IB rendering changes instantly. And the preview assistant now shows your app in different languages with only a mouse click.

Xcode6需要运行在OS X10.9.3以上版本。包含了OS X10.9和iOS8的SDKs。Xcode6包含如下新特性。

Xcode 6 requires a Mac running OS X version 10.9.3 or later. It includes SDKs for OS X versions 10.9 and iOS 8.

Xcode 6 includes the following highlighted features.

Swift 语言Swift Language

 

Swift 是一门面向对象的语言。它是现代的、强大的、富有变现力的,而且容易使用。

Swift is a new object-oriented programming language for iOS and OS X development. Swift is modern, powerful, expressive, and easy to use.

  • 快速。在LLVM中编译和优化使用最先进的代码分析,创建了高性能的应用。Fast. Compiles and optimizes with the advanced code analysis in LLVM to create high-performance apps.

  • 完整的平台。Swift 通过了所有Cocoa和Cocoa Touch框架。Complete platform. Access all of the Cocoa and Cocoa Touch frameworks with Swift.

  • 设计安全。消除了巨大的分类错误、崩溃和安全漏洞。Safe by design. Eliminate huge categories of bugs, crashes, and security holes.

    Swift增加了类型安全的类型推理,不允许直接访问指针,ARC自动管理内存,使Swift 的使用更容易,并且创建了安全和稳定的软件。其他语言安全关联的特性包括强制变量初始化、自动边界检查,以防止溢出、条件语句在default处跳出、默认消除直接存储的指针。

 

Swift pairs increased type safety with type inference, restricts direct access to pointers, and automatically manages memory using ARC, making it easy for you to use Swift and create secure, stable software. Other language safety related features include mandatory variables initialization, automatic bounds checking to prevent overflows, conditionals break by default, and elimination of pointers to direct memory by default.

 

  • 现代。编程、调试和维护更少量的代码,运用一种易写易读的语法,没有头文件的维护。Modern. Write, debug, and maintain less code, with an easy to write and read syntax, and no headers to maintain.

    Swift 包括可选、泛化、关闭、元组和其他现代语言特性。基于OC,Swift 代码会和自然的读写。Swift includes optionals, generics, closures, tuples, and other modern language features. Inspired by and improving upon Objective-C, Swift code feels natural to read and write.

  • 交互。使用Swift 交互式体验与你的想法的实时结果。Interactive. Use Swift interactively to experiment with your ideas and see instant results.

  • 统一。替换了C和OC语言。Swift 支持面向对象特性,包含底层原语如类型、流量控制、运营商。Unified. A complete replacement for both the C and Objective-C languages. Swift provides full object-oriented features, and includes low-level language primitives such as types, flow control, and operators.

全面信息,查看文档The Swift Programming LanguageFor full information about the Swift language and to get started using it, see The Swift Programming Language.

Xcode6的Swift 特性Xcode 6 Features for Swift

  • 游乐场。游乐场使写代码变得多产和简单。键入一行代码,结果立刻可见。如果在运行,例如经过一个循环——你可以添加一行代码到timeline 助理来观察它的运行。在一张图表中展示视图,检测绘制视图的每一步,或者观察一个动态SpriteKit场景。当你完成代码,很容易提到项目中。一些游乐场的应用包括:

 

Playgrounds. Playgrounds make writing Swift code productive and easy. Type a line of code, and the result appears immediately. If your code runs over time—for instance through a loop—you can add that line of code to the Timeline Assistant to watch it progress. Display variables in a graph, inspect each step of drawing a view, or watch an animated SpriteKit scene. When you’ve perfected your code in the playground, simply move that code into your project. Some uses for playgrounds include:

 

    • 设计新的算法,观察每一步的运行结果Designing a new algorithm, watching its results every step of the way

    • 体验新的帮助文档或者Swift 新的语法Experimenting with new API or trying out new Swift syntax

    • 创建新的测试,然后在提交到单元测试之前运行验证Creating new tests and then verifying that they work before promoting them into your test suite

  • 学习游乐场。打开选择一个文档到游乐场,通过指导学习交互式环境。丰富的格式化文档和交互式游乐场的结合,使挖掘帮助文档、改变和体验样代码更容易。

 

Learn in a playground. Open select documentation in a playground to learn from the tutorial in an interactive environment. The combination of richly formatted documentation and interactive playground makes it easy to fully explore the API, changing and experimenting with the sample code.

 

  • 读取-求值-打印-循环在LLDB。调试控制台包括交互式Swift 语言版本的即时创建。使用Swift 语法来与运行中的程序进行评价和交互,或者写新的代码并观察如何在一个类似脚本的环境中运行。这是Xcode 控制台可实现的,或者在终端使用LLDB可以实现。

 

Read-eval-print loop (REPL) in LLDB. The debugging console in Xcode includes an interactive version of the Swift language built right in. Use Swift syntax to evaluate and interact with your running app, or write new code to see how it works in a script-like environment. REPL is available from within the Xcode console, or using LLDB from within Terminal.

 

  • 每个语言文件。Xcode文档视图展示了快速帮助或者参考文档在你选择的C、Swift 或者两者都有时。

 

Per-language documentation. The Xcode documentation viewer shows Quick Help or reference documentation in the language of your choice—Objective-C, Swift, or both.

 

  • 合成头文件。当你需要查看帮助文档如何被写,Xcode会用你期望的语言展示出来。原生是OC写的,Xcode会展示一个Swift 语法版本的头文件,包含作者的评论。

 

Synthesized headers. When you need to see how the API you are using was written, Xcode shows it to you in the language you expect. For API originally written in Objective-C, Xcode shows you a version of the original header file in Swift syntax, complete with the author’s comments.

 

更多信息,查看在游乐场中搜索和评价Swift 代码。For more information, see Exploring and Evaluating Swift Code in a Playground.

附加功能强化了Xcode6 IDEAdditional Feature Enhancements for Xcode 6 IDE

带来更多现在就可视化到你现有的项目中,这些特性是兼容的。

Bringing more live visualization to your existing projects, these new enhancements are also Swift compatible.

测试Testing

  • 绩效测量。强化后的XCTest框架支持量化应用每个部分的性能的功能。Xcode运行性能测试,允许定义一个基准性能度量基线。每个后续测试裕兴比较性能,实时展示变化,通过冲突的问题区域,提醒你一段突发的代码提交的回归分析可以说明了。

Performance measurement. The enhanced XCTest framework now supports the ability to quantify the performance of each part of an application. Xcode runs your performance tests and allows you to define a baseline performance metric. Each subsequent test run compares performance, displays the change over time, and—by highlighting the problem area—alerts you to sudden regressions a code commit could introduce.

  • 异步代码测试。XCTest现在为异步执行的测试代码提供文档。你可以为网络操作创建测试,文件输入输出和其他系统交互,在一个直白的和简单的方式中执行使用异步调用Asynchronous code testing. 

XCTest now provides API for testing code that executes asynchronously. You can now create tests for network operations, file IO, and other system interactions that execute using asynchronous calls in a straightforward and simple manner.

接口创建者(界面生成器)Interface Builder

  • 实时渲染。在程序运行中,接口创建者在设计时会准确的展示自定义对象就在它们出现。当你升级代码,自定义视图,接口创建者设计帆布会自动更新你刚刚键入的源编辑器的新视图,而且不用编译运行。你可以使用接口创建者的检查器来自动查看属性。新文档的帮助,允许开发者定制自定义控制的行为到接口创建者帆布,例如你可以在飞行模式时加载样本数据。

Live rendering. Interface Builder displays your custom objects at design time exactly as they appear when your app is run. When you update the code for your custom view, the Interface Builder design canvas updates automatically with the new look you just typed into the source editor, with no need to build and run. You can use the Interface Builder inspector to see properties automatically as well. Take advantage of new APIs that allow you to customize the behavior of custom controls on the Interface Builder canvas—for instance, you can load sample data on the fly.

更多信息,查看文档。For more information on live rendering, see Creating a Custom View that Renders in Interface Builder.

 

  • OS故事板。Xcode6的OS X的故事板,运用了在AppKit中的视图控制器文档的优势。使绕在一起的多视图和定义无需编码的连续动画变得更容易。鼓励接口继承Mac标准,这样应用可以如用户所期望的一样动作。

Storyboards for OS X. Storyboards come to OS X with Xcode 6, taking advantage of the new view controller APIs in AppKit. Storyboards make it easy to wire together multiple views and define segue animations without writing code. Storyboards for OS X encourage interfaces that follow Mac standards so that your apps behave the way users expect.

更多信息,查看文档。For more information on storyboards, see Storyboard Help.

  • 依大小排列类。iOS8中排列类支持设计一个单一通用故事板,为移动设备定制布局。可以定义共同的视图,并只约束一次,然后为每个支持的形式因子添加变化。iOS 模拟器和资产完整目录也支持。

Size classes. Size classes for iOS 8 enable designing a single universal storyboard with customized layouts for both iPhone and iPad. With size classes you can define common views and constraints once, and then add variations for each supported form factor. iOS Simulator and asset catalogs fully support size classes as well.

更多信息,查看Size Classes Design HelpFor more information on live rendering, see Size Classes Design Help.

  • 自定义iOS 字体。接口创建者渲染在设计阶段就提供嵌入式的自定义字体,使用正确的尺寸,提供一个更准确的预览,应用完成时的样子。

Custom iOS fonts. Interface Builder renders embedded custom fonts during design time, giving a more accurate preview of how the finished app will look, with correct dimensions.

 

调试Debugger

  • 视图调试。使用视图调试使调试应用像调试代码一样简单。一个按钮点击暂停你的应用运行,“爆炸”暂停的界面成3D渲染,返利每一层的一堆视图。使得立即观察到一个图片为什么有可能被修剪和隐藏,图形化元素的顺序变得清晰。通过选中任意视图,通过跳转到在助理编辑源视图中的相关代码可以检查细节。还可以展示自动布局约束,使得查看冲突产生的原因变得简单。

View debugging. Using the view debugger makes debugging an app’s appearance is as easy as debugging lines of code. A single button click pauses your running app and “explodes” the paused UI into a 3D rendering, separating each layer of a stack of views. Using the view debugger makes it immediately obvious why an image may be clipped and invisible, and the order of the graphical elements becomes clear. By selecting any view, you can inspect the details by jumping to the relevant code in the assistant editor source view. The view debugger also displays Auto Layout constraints, making it easy to see where conflicts cause problems.

  • 强化的队列调试。调试导航记录和展示最近执行的块代码和队列块。你可以查看你的队列块在什么地方,检查设置执行的细节。

Enhanced queue debugging. The debug navigator records and displays recently executed blocks, as well as enqueued blocks. You can use it to see where your enqueued blocks are and to examine the details of what’s been set up to execute.

  • 调试仪表。提供关于调试中资源使用一目了然的信息。请你注意先前位置的问题,尤其关于这些部分,可以创建不好的用户体验或者在编写Mac 和设备上排出多余电池。

Debug gauges. Debug gauges provide at-a-glance information about resource usage while debugging. They call your attention to previously unknown problems, especially related to areas that could create poor user experience or drain excess battery on portable Macs and devices.

    • 输入输出仪表。两个新的调试仪表,网络活动和文件活动,视觉上突出显示在应用运行时输入输出活动。

I/O gauges. Two new debug gauges, Network Activity and File Activity, visually highlight spikes in input/output activity while your app is running.

    • 云仪表。包括支持在云端和CloudKit中的新文档特性,提供在应用特定容器之外的对文档的支持。

iCloud gauge. The iCloud debug gauge includes support for the new Documents in the Cloud and CloudKit features that provide access to files outside the app-specific container.

SpriteKit和SceneKitSpriteKit and SceneKit

  • 图形和游戏开发。支持SpriteKit已经由一名新的SpriteKit层设计师显著增强,提升后的SpriteKit变量展示在调试过程中。

Graphics and game development. Support for SpriteKit has been significantly enhanced with a new SpriteKit level designer, and improved display of SpriteKit variables when debugging. 

  • iOS 支持。SpriteKit和SceneKit增强,可以一起工作在iOS 中。可以从Xcode内部完成为你的SpriteKit游戏创建场景。不能更容易了,定义你的人物、背景和游戏其余部分到一起,当为iOS 和OS X两者创建好的游戏时,也更容易共享代码了。

Support for iOS. SpriteKit and SceneKit are now enhanced to work together and on iOS. Create scenes for your SpriteKit games from within Xcode. It is easier than ever to define how your characters, backgrounds, and the rest of your game comes together—it has never been easier to share code when creating great games for both iOS and OS X.

扩展和框架Extensions and Frameworks

  • 扩展支持。添加一个扩展目标到任意设备的应用,目的是扩大应用的功能性。Xcode连接到扩展,当在安全运行和嵌入式上下文中启动、调试这个扩展时。

Extensions support. Add an extension target to any iOS or Mac app to expand your app’s functionality to other apps in the OS. Xcode connects to the extension when launched, debugging the extension as it runs in the safe, embedded OS context.

  • iOS 框架。iOS 开发者可以创建动态框架。框架是一个代码集合,也是强大的资源封装,对于多项目是很有价值的。框架和扩展运行完美,共享逻辑可以被用于主应用和沙河扩展中。

Frameworks for iOS. iOS developers can now create dynamic frameworks. Frameworks are a collection of code and resources to encapsulate functionality that is valuable across multiple projects. Frameworks work perfectly with extensions, sharing logic that can be used by both the main application, and the bundled extensions.

更多信息,查看App Extension Programming GuideFor more information, see App Extension Programming Guide.

iOS 模拟器iOS Simulator

  • 配置。新的iOS 模拟器配置允许保持数据和配置设置组同时进行。为一个版本的应用及其数据运行一个配置,为另一个版本的应用提供另一个配置。

  • 更多信息,查找iOS 模拟器用户指导。

Configurations. New iOS Simulator configurations allow you to keep data and configuration settings grouped together. Run one configuration for one version of an app, with its own data, and another configuration for a different app version.

For more information on iOS Simulator, see iOS Simulator User Guide.

定位Localization

  • XLIFF进出口。Xcode可以打包本地字符串转化工业标准的XLIFF格式,并发送位置信息。当定位完成,何容易将新的语言整合反转到项目中。

XLIFF import-export. Xcode can package your localizable strings into the industry standard XLIFF format to send off for localization. When localization is completed, it’s easy to integrate the new languages back into the project.

  • 隐士的.string文件。Xcode直接从源代码自动生成基础语言.string文件,现在你不需要手动管理.string文件。

Implicit .strings file. Xcode automatically generates the base language .strings file directly from your source code—now you no longer need to manage this .strings file by hand.

  • 在界面生成器中预览。当设计一个界面,预览助理可以展示出接口是如何出现在其他语言中的。你可以查看接口如何响应更长或者更短的语言。

Preview in Interface Builder. While designing in Interface Builder, the preview assistant can show how the interface appears in other languages. You can see how your interface responds to longer or shorter languages.

  • 现场运行。Xcode可以在模拟器中运行你的应用,或者直接在设备中运行,因为应用会出现在其他地区的客户面前。

Run in locale. Xcode can run your app in the iOS Simulator, or directly on devices, as it would appear to customers in other countries.

更多信息,查看Internationalization and Localization GuideFor more information on Xcode 6 localization, see Internationalization and Localization Guide.

编译器Compiler

  • 基于轮廓的优化。PGO与LLVM优化器协同工作,性能测试描述应用最活跃的部分。你可以锻炼应用手动生成一个性能曲线。PGO使用曲线来进一步优化应用,针对最需要优化的区域,提高性能超出了优化设置选项可以达到的成都。

Profile Guided Optimization. Profile Guided Optimization (PGO) works with the LLVM optimizer and your performance tests to profile the most actively used parts of your application. You can also exercise your app manually to generate a performance profile. PGO uses the profile to further optimize your app, targeting the areas that most need optimization, improving performance beyond what setting optimization options alone can achieve.

更多信息,查看文档。For more information on Profile Guided Optimization, see Xcode Profile Guided Optimization.

  • 用户自定义模块。开发者可以定义自己的OC代码模块,共享框架到其他项目变得更容易。通过结合用户自定义模块和Swift的自动创建模块,两种语言更好的协同工作。

User-defined modules. Developers are now able to define modules for their own Objective-C code, making it easier than ever for them to share frameworks across all their projects. By combining user-defined modules with Swift’s automatic creation of modules, the two languages work together seamlessly.

仪器Instruments

 

 

 

 

 

 

 

 

 

 

  • 新用户接口。新的仪器用户接口让配置性能优化协调会话变得更容易,提高了控制。新的模板选择器允许选择设备和目标,还有会话分析的起始点。轨迹视图允许直接点击拖动来设置时间过滤器的范围。工具条占用更少的空间,让你可以关注手边的任务。

New user interface. The new Instruments user interface makes configuring your performance tuning session easier and improves control. The new template chooser allows you to choose your device and target as well as the starting point for your profiling session. The track view allows direct click-and-drag to set the time filter range. The toolbar takes up less space to let you focus on the task at hand.

仪器现在看更像Xcode工作。跟踪记录数据给予了更多空间,配置如何数据收集和在一个统一的督查区域内视图管理。

Instruments now looks and works more like Xcode. The tracks of recorded data are given more space, and configuration for how data is collected and viewed is managed in a unified inspector area.

  • 描绘测试。选择任意测试或单元测试来描绘,巨大的内存泄漏分析,在一个功能测试或时间分析性能测试中,查看为什么它退步了。

Profile tests. Choose any test or test suite to profile, great for analyzing memory leaks in a functional test or time profiling a performance test to see why it has regressed.

  • 支持模拟器配置。模拟器配置被仪器认为是设备,加载或者更容易附加到进程。

Support for simulator configurations. Simulator configurations are treated like devices by Instruments, making it easy to launch or attach to processes in the simulator.

  • 新计数器仪器。计数器和事件仪器已经结合到一个更强大的仪器中,更容易配置。可以跟踪单个CPU事件,可以指定共识来测量事件的集合体、比率和更多。iOS 开发基于64位设备可以使用计数器来微调应用。

New Counters instrument. Counters and Events instruments have been combined into a more powerful instrument and made easier to configure. It can track individual CPU events, and you can specify formulas to measure event aggregates, ratios, and more. iOS developers on 64-bit devices can now use Counters to fine tune apps.

  • Swift 和扩展支持。会看到在堆栈跟踪Swift 符号和Swift 类型在Allocations。可以使用仪器来描绘应用扩展。

Swift and Extensions support. Of course, Swift is supported—you’ll see Swift symbols in stack traces and Swift types in Allocations. You can also use Instruments to profile your app extensions.

Xcode服务器Xcode Server

  • 触发器。允许你做更多复杂的集成方案,通过在一个Xcode方案执行之前或者之后配置服务器端规则来加载客户端的脚本。

Triggers. Triggers allow you to make more complex integration scenarios by configuring server-side rules to launch custom scripts before or after the execution of an Xcode scheme.

  • 集成的性能测试。Xcode服务器支持新Xcode性能测试特性,使团队共享一组设备的持续性能测试变得简单。

Performance test integrations. Xcode Server supports the new Xcode performance-testing features, making it easy for a team to share a group of devices and Macs for continual performance testing.

  • 三角洲跟踪。问题现在每个积分都会被跟踪,所以可以馋看一个问题什么时候出现或者什么时候被修正、被谁修正了。

Delta tracking. Issues are now tracked per integration, so you can see when an issue appeared or when it or was fixed, and by whom.

  • 更大的控制。Xcode服务器中的配置选项给开发团队在机器人执行中提供了更大的控制权。新设置对于集成时间间隔、机器人分组和iOS 模拟器配置,使得Xcode机器人更强大。新的报告界面包括bot等级统计,例如成功次数关于整合、提交、跟踪测试,等等。

Greater control. Configuration options in Xcode Server give development teams even greater control over the execution of bots. New settings for integration intervals, grouping of bots, and iOS Simulator configurations make Xcode bots more powerful than ever. The new reports UI includes bot-level statistics—for example, the number of successful integrations, commit and test addition tracking, and so forth. 

 

HomeKit配件模拟器HomeKit Accessory Simulator

  • HomeKit可用。新的HomeKit框架允许用户在家进行应用间的交流,控制连接配件。HomeKit使用于iOS应用,在项目编辑器控制面板中设置HomeKit开关。选择Xcode>Open Developer Tool>HomeKit附件模拟器来使用。

 

HomeKit capability. The new HomeKit framework allows your app to communicate with and control connected accessories in a user’s home. To use HomeKit with your iOS apps, set the HomeKit switch in the project editor capabilities panel. Choose Xcode > Open Developer Tool > HomeKit Accessory Simulator to start using the simulator.

更多信息,查看参考文档。

 

For more information on HomeKit, see Home Kit Framework Reference.

 

转载于:https://www.cnblogs.com/zyingn/p/Tools_Xcode6.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值