WWDC 2015 Session 104

Session 104 What’s new in Xcode

Swift 2.0

Swift 2.0


Play Ground

新的 Play Ground,更適合作為教學使用。

加入 Mark Up 幫你的 Play Ground 做導引及解說。

現在可以添加 swift source and image resource,且可以做成 page。

新 Play Ground
Mark Up
swift source and image resource
page

App Thining

App Thining

XCode 7 可以幫你的 APP 做瘦身,瘦身後的 APP 能更快的被下載安裝 & launch。

  • Bitcode
  • Slicing
  • On demand resource

將 image 放到 asset 後, Xcode 會自動依照 Device 解析度不同,下載對應的 resource,而不是把1x~3x一同下載。

On demand resource:可以對 resource 下 tag,並且在需要的時候從 app store 下載回來。

On demand resource code
On demand resource runtime


Debug

在以前的版本,Debug 相當辛苦,當 crash 發生後,大部份都只會跳到不相關的 main.m 檔。

現在只要 enable address sanitizer,相信會有更好的 debug 體驗。

enable address sanitizer


Crash Log

當 APP 發布之後,很常見到使用者操作之後發生 Crash,但這些 Crash 開發者通常很難去重現。

現在搭配 APP STORE or TEST FLIGHT,可以幫你整合 Crash Log 並導引你到當時 Crash 的狀態


打開Crash Log 要先點 Organizer
選擇 Crash 後,點 Open in Project,開始修復 Bug


Code Coverage

開啟 Code Coverage


UI Testing

錄製 UITest 腳本