PebbleKit iOS SDK dynamic framework 問題
最近 EverLearn の Pebble アプリがiOSアプリと接続できずエラーが表示されるので、重い腰を上げて PebbleKit iOSを最新に上げてみた。
cocoapod を使っているので pod install で更新されるのだが、pod install するたびに Xcodeの Build Settings > Build Active Architecture Only が YES になるので、まずその設定を NO に修正。
これでビルドは通るようになるのだが、次に今までみたことがないエラーが表示された。
dyld: Library not loaded: @rpath/PebbleKit.framework/PebbleKit Referenced from: /var/mobile/Containers/Bundle/Application/…
Reason: image not found
結局この解決に1日使ってしまったが、
pebble/pebble-ios-sdk at 3.1.1: iOS PebbleKit SDK to talk to the Pebble via Bluetooth をみると
PebbleKit is now a dynamic framework. とある。
いろいろ調べたところ iOS8からそれまでは OS Xでしか利用できなかった dynamic framework が利用可能になったらしい。 Swift をサポートするためには dynamic framework でなければいけないようで、PebbleKit iOSはSwift対応したのでその際に dynamic framework 対応もされたらしい。
そして、dynamic framework を利用するためには General > Embedded Binaries に PebbleKit.framework を追加しないといけないらしい。
Embedded Binaries with iOS Framework – Stack Overflow
ということで、今は動くようになった。
しかし Pebble のBluetooth 接続がおかしいので Reset したら、PebbleのUpdate Server が止まっているらしく復旧ができなくなってしまった。
困るので早く直して下さい Pebble.
2016/02/28 更新
その後Pebbleのサポートに連絡してみたところ、iPhone側をリセットすることで解決できた。サーバー側の問題ではなかったようだ。 Pebble Update Server Error 問題 | tokentoken.com
そして Dynamic framework 問題だが、PebbleKit Framework をダウンロードして解決したと思ったら、App Storeへのアップロード時に問題が発生してしまった。
Pebbleサポートに問い合わせしたところ、Frameworkファイルを直接組み込んだ場合は、自分で不要なものを strip しないといけないらしい。
He has to strip the framework from the simulator architectures before sending it to the App Store. Cocoapods and Carthage do this for you. You can use the Carthage method instead of creating your own script: https://github.com/Carthage/Carthage and look for step 4 for the `carthage copy-frameworks` build phase.
cocoapod を使えばその処理は不要だというので、以前失敗したのだが… と思いつつ再度試したところ、今回はなぜか大丈夫だった。
ということで今は cocoapod を使ってビルドもApp Storeへのuploadでもできている。以前なぜできなかったのかは不明だ。
関連記事
-
-
謎のエラー iPhone/iPod Touch: application executable is missing a required architecture
リズムくん Ver.1.1の App Store への Submit の際に、謎のエラー iPhon
-
-
Apple Watch用バッテリーロガーを公開しました
1年前に開発し、App StoreにSubmitしたものの Rejectされ続けていたアプリをその
-
-
[iPhone SDK] UILabel からポップアップメニューを表示してみる
今作っているアプリに UILabel を複数置いた画面があるが、その UILabelたちは編集
-
-
Your application status is Ready for Sale
5/2にAppStoreにSubmitしたアプリに関して、Apple から Your applica
-
-
新アプリ「コードちゃん」を公開しました
速報:新 iPad 発表。Apple Pencil対応で3万7800円から - Engadget
-
-
[iOS] iOS6 から起動時に一度 Portraitになる挙動が変更された模様
iOS6 からは画面の回転関係の仕様が整理されたのか、いろいろと変更が入っている。 まず - (B
-
-
Pebble Time Round 欲しい
さらに薄く、軽くなった、ギークでなくても使える Smartwatch Pebble Time Ro
-
-
Apple Special Event 2012
2012年は下記が発表された。 iPhone 5iPod touchiPod nano
-
-
[iOS開発本] よくわかる Auto Layout
あまりにも Auto Layout がわかりにくいので、業を煮やして開発本を買ってしまった。「よくわ
-
-
[iPhone SDK] iOS 4で導入された Blocks とは
Game Center を試していると、たくさんの^ (Caret というらしい。自分はハットと覚え