ブログ再開!

技術ネタを引き続き書いていきます

いまさらな話ですが、iOS9bundle Identifierではまった話を書きます

iOS9がでて一ヶ月が経とうとしています

以前から社内では
モック段階のアプリをOTA(Over The Air)
インストールしていました

iOS9でOTAでインストールしようと思ったら
InstallError

エラーが発生

Deviceのconsoleログをしらべてみると
-----------------------------------------

 Oct 10 19:36:43 GoodooiPad itunesstored[121] &ltWarning>: BundleValidator: Failed bundleIdentifier: com.example.foo-in-house does not match expected bundleIdentifier: com.example.foo-inHouse

-----------------------------------------

BundleValidator:Failedの文字が!

アプリのbundle Identifierを確認してみると
com.example.foo-inHouse
でした(名称は仮称です)

どうやら、OTAでインストールさせようとしたときのリンク(plistの記述)がおかしいらしい・・・

確認したところ次のような記述になってました
-----------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
&ltplist version="1.0">
&ltdict>
&ltkey>items</key>
&ltarray>
&ltdict>
&ltkey>assets</key>
&ltarray>
&ltdict>
&ltkey>kind</key>
&ltstring>software-package</string>
&ltkey>url</key>
&ltstring>https://example.com/foo.ipa</string>
</dict>
</array>
&ltkey>metadata</key>
&ltdict>
&ltkey>bundle-identifier</key>
&ltstring>com.example.foo-in-house</string>
&ltkey>bundle-version</key>
&ltstring>1.1.0</string>
&ltkey>kind</key>
&ltstring>software</string>
&ltkey>title</key>
&ltstring>Foo</string>
</dict>
</dict>
</array>
</dict>
</plist>

-----------------------------------------

なんと、bundle-identifierが
まちがった文字列
com.example.foo-in-house
になってました(ぐぬぬ・・・)

いままで(iOS8)までは、このplistのbundle-identifierが
ダウンロードするipaのものと一致していなくても
問題なかったんですね(逆にびっくり)

iOS9から厳密になってインストールエラーになったというお話でした

ぐぐっても日本語の情報にすぐたどりつかなかったので、ブログネタとしての投稿です