Invalid Signature で App Store に Submit できず

公開日: : 最終更新日:2011/10/30 iPad, iPhone ,

無料版と有料版を同じソースからビルドできるようにしようと思いいろいろ試行錯誤を続けている。
ついにビルドしてXcodeのValidateも通るようになったのだが、実際にSubmitすると、正常にSubmitされたように見えるが、しばらくすると下記のメールが iTunes Connectから送られてきた。

Your recent binary submission to the App Store

Invalid Signature – Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose “Clean All” in Xcode, delete the “build” directory in the Finder, and rebuild your release target.

いろいろ手を尽くしてみたが、解決できず。
DevCenterのフォーラムをあさってみたが、この問題で苦しんでいる人はたくさん発見できるのだが、解決方法は見つけられなかった。

てぃーのiPhoneアプリ開発 【申請方法】Invalid Binaryの理由について に様々なチェックすべきポイントが書いてあるが、どれにもあてはまらず。
結局あきらめてiTunes Connect にメールで問い合わせしてみた。果たして原因はつかめるだろうか。

追記 2011-04-22

itunesconnect@apple.com から回答が来ていて、別な問い合わせ先にメールしろとのこと。
確認事項を一通り実施して、そちらにメールしてみた。
Uniform Type Identifiers Overview: Uniform Type Identifier Conceptsへのリンクを示されて、
The name of your application and your Bundle Identifier (in Info.plist) contain only Roman letters, numbers, hypens (“-“) and periods (“.”).
と書かれていたのだが、application name にスペースが使えないと実際困ると思うのだが。
The name of your application がどこのことを示しているのかを知りたいところだ。

追記 2011/04/29 ようやく解決

朝8時にようやく返信が来ていて、まずは TN2250(Technical Note TN2250) を確認せよとのこと。

codesign -dvv myapp.app
codesign -d --entitlements - myapp.app

のように codesign コマンドの使い方を知った。
これで、正しくSubmitできるアプリと、Submit後しばらくするとInvalid Signature のメールが送られてくるアプリとを比較すると、codesign -d –entitlements – myapp.app の出力結果が異なる。
具体的には、問題が起きる方は、

<key>keychain-access-groups</key>
	<array>
		<string>54LJ5L2HW5.*</string>
	</array>

のようになっていた。
これを修正するために、試しに Xcode 3.2.6(2011/04/30 現在の Xcode3系列の最新版) で Entitlements.plist を作成してみたところ、kimadaの日記 – iPhoneアプリ開発グループ にあるような Entitlements.plist ファイルが作成された。
プロジェクト > アクティブターゲットを編集 で、ビルドタブの Code Signing の コード署名権限 にこの Entitlements.plist ファイルを指定した後に Build してみると、codesign -d –entitlements – myapp.app の結果が、

	<key>keychain-access-groups</key>
	<array>
		<string>54LJ5L2HW5.jp.ne.sakura.token.gosenfu01</string>
	</array>

になった。この状態で Submit してみたところ、ついに Submit に成功し、Waiting for Review のメールが送られてきた!
結局、1週間以上にわたりかなりいろいろと試したが、最終的には Entitlements.plist ファイルを作成して、コード署名権限に設定したことで問題が解決したようだ。

このInvalid Signature 問題が起きたときは、codesign コマンドを使ってみると解決の糸口がつかめるかも知れない。
解決まで長かった…

2011/10/30 追記

久しぶりに新規アプリをSubmitしてみたところ、問題なくSubmitされたが後からエラーメールが送られてきた。

Dear Developer,

We have discovered one or more issues with your recent binary submission for “application name”. Before your app can be reviewed, the following issues must be corrected:

Invalid Code Signing Entitlements – The signature for your app bundle contains entitlement values that are not supported. For the com.apple.developer.ubiquity-container-identifiers entitlement, the first value in the array must consist of the prefix provided by Apple in the provisioning profile followed by a bundle identifier suffix. The bundle identifier must match the bundle identifier for one of your apps or another app that you are permitted to use as the iCloud container identifier.

Specifically, value “FR3FXXXXXX.*” for key “com.apple.developer.ubiquity-container-identifiers” in XXXX is not supported.

Invalid Code Signing Entitlements – The signature for your app bundle contains entitlement values that are not supported.

Specifically, value “FR3FXXXXXX.*” for key “com.apple.developer.ubiquity-kvstore-identifier” in XXXX is not supported.

Once these issues have been corrected, go to the Version Details page and click Ready to Upload Binary. Continue through the submission process until the app status is Waiting for Upload and then use Application Loader to upload the corrected binary.

これはまたあの悪夢の再来か? と思って調べ始めたところ、何とiCloudと関係があるらしい。
App Submission Error – Invalid binary – Invalid Code Signing Error – Stack Overflow
App IDの設定のところで、iCloud の設定があるのでそこをDisableして Provisioning Profileを作成すれば良いとのこと。
これで Invalid Code Signing Entitlements は回避できたが、今度は Submit 後、Invalid Signature のエラーが返ってきた。
Clean All して、Releaseの Code Sign を再度指定してArchiveしてSubmitしたところ、また失敗。
結局、Edit Scheme の Archive の設定が AdHoc になっていたという落ちであったようだ。
それくらは Xcodeの Validate あたりで発見して欲しいところだが。

関連記事

no image

2009年9月発売のiPhone SDK関連書籍

9月は書店に行くたびにiPhone SDK関連本が増えていて驚いた。 調べてみたところ、少なくとも下

記事を読む

Apple Watch用バッテリーロガーを公開しました

1年前に開発し、App StoreにSubmitしたものの Rejectされ続けていたアプリをその

記事を読む

no image

[iOS SDK] モーダル表示したViewController を取得する

UIViewControllerの presentViewController:animated:c

記事を読む

no image

iPhone&Androidアプリ内課金プログラミング完全ガイド

こんなマニアックな本が11月に出ていたらしい。 立ち読みしてよさそうだったら買ってこよう。 売れ

記事を読む

[i0S8] presentModalViewController で表示している画面で文字が切れる

iOS8 を甘く見ていたようで、いろいろな問題が発生している。 今回発見したのは おんぷち

記事を読む

no image

APNs のサーバー側をサポートしてくれる Urban Airship (APNs対応その2)

Apple Push Notification Service (APNs) はAppleのAPN

記事を読む

no image

ついにヒレガス本第3版が出るらしい

以前から、いつかは出るかな、いやもういまさらでないかなと思っていたヒレガス本の第3版が11月についに

記事を読む

no image

[iPhone 開発本] iPhoneのオモチャ箱 でしばらく遊べそう

cocos2d/Box2Dを調べたいと思っていたら丁度発売されたので買ってみた。 実際にcocos2

記事を読む

no image

iPhone 3GS/4 で使える Bluetooth キーボード ELECOM TK-FBP017BK

フォローしている人のつぶやきで発見した記事で知ったキーボード。iPhone4ユーザー必携Blueto

記事を読む

LogLocation 1.3.1 で和暦問題に対応しました

4年ぶりに位置情報ログ取りアプリ LogLocations をアップデートしたところ、レビューにて不

記事を読む

Message

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

ポモドーロテクニック用物理タイマーならTime Timer

会社ではなかなか自由に時間を使えないが、家で読書や作業をする

DELL 32インチディスプレイ U3223QE 購入

Dell U3223QE は解像度 3840x216

WWDC 2023 Vision Pro発表

2023/6/5 (日本時間 2023/06/06 2AM)のWWD

M1 MacBook Air を Venturaにアップデートする

M1 MacBook Air を macOS Montere

iOS16でaurioTouch の inBufferFramesが1になる

https://developer.apple.com/librar

→もっと見る

PAGE TOP ↑