Apple純正アプリの中でSwiftが採用されているものはEl CapitanのDockやiOS 9の計算機など一部のアプリにとどまっているもよう。

OS X 10.11 El Capitan Swift
記事内に広告が含まれています。
スポンサーリンク
スポンサーリンク
スポンサーリンク

 Appleの純正アプリでSwiftが採用されたものはEl CapitanのDockやiOS 9の計算機など一部のアプリにとどまっているようです。詳細は以下から。

Swift-Hero

 AppleはWWDC 2014でOS X/iOSのためのプログラミング言語「Swift」を公開し、その後2015年12月にオープンソース化しましたが、Appleが開発しているOS XやiOS内のアプリでSwiftを用いて書かれているものは一部のアプリにとどまっているそうです。

Swift has quickly gained popularity among many third party developers, but what about for Apple’s own code? As of iOS 9.2, Calculator.app is the only place in the system that you’ll find any Swift.

Is Apple Using Swift in iOS? — Medium

AppleのSwiftアプリ

 InstagramのエンジニアRyan Olsonさんがリバース・エンジニアリングによりiOS 9.2内のアプリを調べてみたところ、ほぼ「純正なSwift アプリ」は22のクラス中2クラスがObjective-Cで、それ以外がSwiftで書かれている計算機アプリしか無く、WWDCアプリでは281クラス中6クラスでしかSwiftが使用されておらず、

Calculator.app is actually almost “pure Swift” with only 2 of its 22 classes written in Objective-C. Just like third party apps that use Swift, Calculator.app has to bundle the Swift libraries it links to. There are no Swift libraries included with the OS because the ABI is not yet stable.

Is Apple Using Swift in iOS? — Medium

 同様にiOS App StoreのTop 100に存在するフリーアプリのipaファイルを解析したところ、大半の(89%)アプリは全くSwiftを使用していなかったそうです。

Swift-in-the-Top-100-Free-Apps

I once again downloaded the top 100 free apps and wrote some scripts to analyze the .ipa files. It surprised me to find that the vast majority of the apps in the top 100 are still building without any Swift.

Are the Top Apps Using Swift? — Medium

 Daring FireballのJohn GruberさんとAppleのSVP Craig Federighiのトークショー(Podcast)では、OS X 10.11 El CapitanでSwiftが用いられているアプリはDockとウィンドウマネージャだとも話していますが、

Is_Apple_Using_Swift_in_iOS

You know, we’ve had some really great adoption by teams like … the team that does the Dock and the window management on OS X, implemented all their new features for El Capitan in Swift and started mass-converting all of their code, and say that they couldn’t imagine going back and that they’re more productive with it.

The Talk Show ✪, Ep. 139: Transcript of Craig Federighi and John Gruber

 Apple社内でもアプリのSwift化が進まない原因として、他の開発者達はSwift Application Binary Interface (ABI)の安定性やSwiftライブラリがOSに含まれていない点などを指摘しているようです。

コメント

  1. Apple7743 より:

    iOSアプリの場合、libswift*.dylibだけで18MBくらいサイズが持って行かれるんだよな。
    モバイルでダウンロードできるアプリサイズの上限が100MBなのに。

  2. Apple7743 より:

    ・過去のコードは全てObj-Cで書かれている
    という最も重要な点が抜けてる

  3. Apple7743 より:

    ダイナミックリンクライブラリを個々のソフトの配信に含めるやり方はwindowsでもあるけど、普通はosのアップデートに
    含めれば良いんじゃ無いの?
    つかコンパイル時にスタティックにリンクしてるの?

  4. Apple7743 より:

    Swift 3.0が来たら本気出すでしょ (適当)

  5. Apple7743 より:

    Carbonから抜けるのも結構時間掛かってたし
    むしろOSのコンポーネントを無理矢理Swift移行して不具合出されると困るわ

  6. Apple7743 より:

    速攻で移行が進んだらそっちの方が奇妙でしょ,11%も以降段階のアプリがあることの方が驚きだよ

  7. Apple7743 より:

    同じようにライブラリが使えるとは言え、言語仕様的には全く違うものだし、
    過去の資産(知識や自前のライブラリ)を手放すのには
    それなりのマンパワーいる。
    そういう意味では頑張ってる方じゃない?
    まあそれでも個人的には一から作るなら
    macのアプリはswiftの方が開発しやすい気がする。

タイトルとURLをコピーしました