iOS9がリリースされたので、開発環境をxcode6.4からxcode7にアップデートしたのですが、その時にはまった事がありましたので備忘録として書いておこうと思います。

xcode7にすると、swiftもバージョンが2.0にアップデートされるため、それまでビルドが通っていたものが通らなくなったり、警告が出たりします。
IDEがとっても親切なのでエラーの理由を読んでその通りに修正していけば問題なく修正は完了します。


しかし、ArchveするためにGeneric iOS Deviceを選択してビルドをすると、
「ld: '/home/GoogleMobileAdsSdkiOS-7.4.0/GoogleMobileAds.framework/GoogleMobileAds(GADBannerView.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)」
というadMob広告に対するリンクエラーが発生してしまいます。
これは、「ENABLE_BITCODE」のオプションがデフォルトでYESとなっているようなのでNOにしてあげれば解決されます。
Build Setting → ENABLE_BITCODEをNOにします。
bit code



これを修正してビルドをすると今度は
「All interface orientations must be supported unless the app requires full screen.
A launch storyboard or xib must be provided unless the app requires full screen.」
こんな警告が出ました。
この警告の対処は
Targets → General → Deployment Info → Requires full screenにチェックを入れる事で消すことができます。
fullscreen

って事で、「巻数メモ」アプリをバージョン1.2にアップデートしました!

  巻数メモ

1.1の時に、起動時にすぐにアプリが落ちるという現象が発生していましたが、1.2では解消されました!
iOS9でxcode6.4で開発されたアプリを起動する場合に起きるのかな・・・