stack overflowで最も投票数の多かったios関連のquestionベスト10(2015年版)

40
皆さん、年末ですね!

Upload: kosuke-ogawa

Post on 14-Jan-2017

2.025 views

Category:

Technology


1 download

TRANSCRIPT

皆さん、年末ですね!

今年もいろんな バグに悩まされましたね

というわけで

Stack Overflowで 最も投票数の多かったiOS関連のQuestionベスト10(2015年版)

Kosuke Ogawa (@koogawa) 2015.12.12 yidev 第21回勉強会

• 小川航佑 Kosuke Ogawa • @koogawa • Supership(旧nanapi)所属 • iOSアプリを仕事・趣味でいろいろ開発

70万DL突破! 20万DL突破!

それでは10位から 見ていきましょう

第10位

Swift 2.0 で UIUserNotificationType の複数指定に “|” が使えなくなった問題(86票)

http://stackoverflow.com/questions/30761996/swift-2-0-binary-operator-cannot-be-applied-to-two-uiusernotificationtype

Swift 2.0 で UIUserNotificationType の複数指定に “|” が使えなくなった問題(86票)

• UIUserNotificationType の型

• Swift1.2では RawOptionSetType

• RawOptionSetType はBit演算可能

UIApplication.sharedApplication().registerUserNotificationSettings(UIUse

rNotificationSettings(forTypes: UIUserNotificationType.Alert |

UIUserNotificationType.Badge, categories: nil))

Swift 2.0 で UIUserNotificationType の複数指定に “|” が使えなくなった問題(86票)

• UIUserNotificationType の型

• Swift 2.0では OptionSetType に変更

• OptionSetType はBit演算できない

• ”|” を使うとエラーになる

let settings =

UIUserNotificationSettings(forTypes: [.Alert, .Badge],

categories: nil)

UIApplication.sharedApplication().registerUserNotificationSettings(settin

gs)

第9位

Multitasking サポートのiPad アプリが申請できない問題(108票)

http://stackoverflow.com/questions/32559724/ipad-multitasking-support-requires-these-orientations

Multitasking サポートのiPad アプリが申請できない問題(108票)• Xcode 7 (iOS 9 SDK) で iPad に対応したアプリをビルドすると、自動的に Multitasking 対応アプリになる

• このとき全ての orientation(デバイスの向き)に対応していないとアプリ申請時にエラーが出る

• Info.plist の UIRequiresFullScreen を YES にすれば回避できる

第8位

BITCODE って何?問題(104票)

http://stackoverflow.com/questions/30722606/what-does-enable-bitcode-do-in-xcode-7

BITCODE って何?問題(104票)

• bitcode とはどんな機能で、何が起こるのか教えてくれ!

• App Thinning (App Slicing, On-Demand Resources, Bitcode)のひとつ

• Apple がアプリのコンパイルを代行して自動最適化してくれる仕組み

第7位

Xcode 6.4 でアプリが 申請できない問題(109票)

http://stackoverflow.com/questions/33270301/xcode-6-4-the-application-you-have-selected-does-not-

exist

Xcode 6.4 でアプリが 申請できない問題(109票)

• Unable to Validate Your Application The application you have selected does not exist. というエラーが出て申請できない

• Application Loader使ったらうまくいった!がベストアンサー

第6位

iOS 8.4 の Developer Disk Image が見つからない問題(110票)

http://stackoverflow.com/questions/30736932/could-not-find-developer-disk-image-xcode-7-ios-8-4

iOS 8.4 の Developer Disk Image が見つからない問題(110票)

• Xcode 7 beta で iOS 8.4 実機ビルドしようとすると上記エラーが出る

• Xcode 6.4 では iOS 8.4 をサポートしているけど、Xcode 7 betaでは iOS 8.3 までしかサポートしていない、 という微妙な時期があった

• Xcode 6.4 の iOS 8.4 image をまるごと Xcode 7.0 にコピーしたら直った

第5位

ビルドがずっと「処理中」のまま問題(131票)

http://stackoverflow.com/questions/27928471/my-prerelease-app-has-been-processing-for-over-a-week-in-

itunes-connect-what

ずっと「処理中」のまま問題(131票)

• iTunes Connect にアップロードしたビルドが “processing” から動かない問題

• 世界中で同じ問題が発生していたもよう

• 様々な回答が寄せられた

• ビルド番号を変えてアップロードし直したら解決した

• Application Loader 使ったらいけた

• bitcode 無効にしたらいけた

• 最終的にベストアンサーに選ばれたのは・・・

「Appleに問い合わせろ」

第4位

CFNetwork SSLHandshake 問題(132票)

http://stackoverflow.com/questions/30720813/cfnetwork-sslhandshake-failed-ios-9

CFNetwork SSLHandshake 問題(132票)

• iOS 9にしたらサーバにアクセス出来なくなった

• httpsでアクセスしているのにエラーになる

• ベストアンサー:iOS 9 および OSX 10.11 からは、サーバ側も TLS 1.2 をサポートしている必要があるよ

第3位

App Transport Security 問題(188票)

http://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-

ios-9

App Transport Security 問題(188票)

• Transport security has blocked a cleartext HTTP というエラーが出て通信できない

• info.plist の NSAppTransportSecurity > NSAllowsArbitraryLoads に YES をセットしたらいいよ、がベストアンサー

• ※ただし、この方法は一時的な回避策であり、推奨された方法では無いのでご注意を

第2位

iOS 8.1.3の実機にアプリがインストールできない問題(194票)

http://stackoverflow.com/questions/28231338/ios-app-the-application-could-not-be-verified-only-on-one-device

iOS 8.1.3の実機にアプリがインストールできない問題(194票)• 時期的にXcode 6.1

• The application could not be verified. というエラーが出る(遭遇した人いますか?)

• デバイスからアプリを削除して、Xcodeを再起動して、もう一度アプリをインストールしたらうまくいった(割と基本的w)

第1位

App Transport Security 問題(344票)

http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http

App Transport Security 問題(344票)

• 3位の質問と被ってるので解説は割愛します

• 重複してもこの投票数なのはそれだけ苦しんだ人が多いということ?

• ちなみに先に投稿されたのはこっち

来年もがんばって いきまっしょい!