【速報】Xcode9が発表!新機能のまとめ!

Xcode8の動作の重さで参っている、Guttyoです。

WWDC 2017の基調講演での発表はありませんでしたが、開発者向けの要素としてXcode9が発表されました。

Xcode8から変更された要点がApple公式に公開されていたため、まとめてみました。

スポンサーリンク

目次

スポンサーリンク

Xcode 9 新機能まとめ

Xcode 8の次期バージョンであるXcode 9はかなり期待ができそうですよ!

 

すべて作り直され、爆速になったコードエディタ

新しいコードエディタはスピード改善のために全て書き直され、今までのエディタの問題となっていたスピードが向上しています。

さっそくベータを使用している開発者の感想を紹介します。

 

エディタの速度が上がるだけでも十分に気持ちよく使えそうです。
今までが遅すぎた、という印象が大きいかもしれませんが(笑

 

The source code editor has been completely rebuilt for amazing speed. It scrolls at a constantly smooth rate, no matter the files size. And it looks better, too, with preferences that give you greater control over line spacing, multiple font styles, and even the type of cursor. The new command-click gesture makes it easy to visualize and select sections of code based on structure. Issues have been redesigned to flow nicely with your code with Fix-its are grouped together so you can commit multiple changes in a single click.

出典:https://developer.apple.com/xcode/

Refactor and Transform

どのように日本語訳すると良いのか悩みましたが思い浮かびませんでした。

機能的には関数名などを変更したい場合に同時に編集できる機能がパワーアップしたようです。

その他Xcode9には下記の機能強化があります。

  • Add missing protocol requirements
  • Generate missing implementation stubs
  • Add missing overrides for abstract methods
  • Extract to local variable
  • Extract method / expression
  • Expand default in switch statements to generate all applicable cases
  • Convert if/else to / from switch statement
  • Wrap string in NSLocalizedString macro

出典:https://developer.apple.com/xcode/

 

ソースコード管理 GitHub連携がより簡単に

Xcode 9ではGitHubアカウントを入力することで簡単にGitHubと連携することができるようです。

Xcode 9 makes working with source control – and with GitHub – easier and more tightly integrated. With your GitHub account built into Xcode, the clone window shows all of your personal GitHub repositories, as well as all the repositories where you added a star. From this window, you can search all of GitHub and check out a project with just a click.

出典:https://developer.apple.com/xcode/

 

Swift 4のサポート

Swift 3からの移行も問題なくできるようです。

The Swift.org open source community led by Apple has helped Swift build quickly, while producing faster applications and smaller executables. The new Swift 4 compiler now understands Swift 3 code. You can easily move to Xcode 9 right away, choose which parts of your application are ready to move to Swift 4, and migrate the rest of your code later. The language also features an enhanced String type.

出典:https://developer.apple.com/xcode/

 

USBケーブル無しのアプリ転送

同じローカルネットワークに接続されているiPhoneやApple TVでは、USB経由で接続していなくてもアプリを転送し、開発することができるようになります。

Choose any of your iOS or tvOS devices on the local network to install, run, and debug your apps – without a USB cord plugged into your Mac.

出典:https://developer.apple.com/xcode/

検証と検査

Xcode 9 ではシュミレーターも進化しています。

シュミレータへのアプリ転送や起動速度の高速化、様々なデバイスの同時シミュレートもできるようですね。iPhoneとiPadのシミュレーターを同時起動しデバッグできますのでより効率的にコーディングできるようになるでしょう。

 

The new Simulator app is dramatically upgraded with faster launch times and a new look – the window now appears just like the device you are simulating. Buttons in the device work as expected, and you can even simulate gestures from the screen edge. Touch Bar support means quick actions, such as rotate, are only a tap away.

You can run multiple instances of Simulator to speed up tests by running them in parallel, or test apps that coordinate tasks such as syncing to iCloud across multiple devices. Easily launch Simulator from the command-line, even when driving multiple instances — perfect for automated testing. And Xcode Server is simpler to set up on all of your Macs, as it's now built into Xcode and no longer requires a separate macOS Server app. It’s never been easier to continuously build and test your apps.

出典:https://developer.apple.com/xcode/

様々な場面で速度の改善

大きなプロジェクトでの検索に関しては最大50倍もの高速化が行われているようです。

ビルド時の効率上昇も行われているようですね。

A brand new indexing engine runs as part of the build process, so Xcode understands your code automatically. Tasks that use the index, such as Open Quickly, are dramatically faster. Searching large projects feels impossibly quick – up to 50 times faster. And a new build system dramatically lowers the overhead of tasks that coordinate the compiler, linker, and other tools.

出典:https://developer.apple.com/xcode/

スポンサーリンク

Xcode 9 に関する詳細情報

Xcode 9 の詳細情報についてはAppleからのリリースノートが出ていますのでそちらをご覧ください。

【参考リンク】: Xcode 9 リリースノート (英語)

【参考リンク】: Apple Developer

 

スポンサーリンク

まとめ

Xcode8は動作が遅い印象でしたが、Xcode9で改善されているようです。

私は未だにMacbook Pro Retina Late 2012を使用しているため、速度改善はめちゃくちゃ歓迎です。

 

私のアプリはアップデートしないとiOS 11で動作しないようですので、Swift 4で書き直しをしようと考えていますので、今年はアプリ開発が楽しそうな年になりそうです。

 

Xcode 9の次はXcodeXになるのかな?来年どうなるか楽しみです。笑

 

それでは最後までお読みいただき、誠にありがとうございました。

 

この記事が気に入ったら
フォローしよう

最新情報をお届けします

Twitterでフォローしよう

おすすめの記事