LoginSignup
2
3

More than 1 year has passed since last update.

Invalid Signature. A sealed resource is missing or invalid. The file at path “アプリ名.app/アプリ名” is not properly signed. に対応する

Last updated at Posted at 2023-03-23

iOSアプリのアップデートでやらかしたので自戒も兼ねて対応方法を記録しておきます。

エラー内容

審査に提出するためにApp Store Connectにアップロードするときに以下のエラーが出力されアップロードできませんでした。

Invalid Signature.
A sealed resource is missing or invalid.
The file at path “進捗どうですか.app/進捗どうですか” is not properly signed.
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.
For more information, please consult https://developer.apple.com/support/code-signing. (ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

翻訳↓

無効なシグネチャーです。
捺印されたリソースが見つからないか、無効です。
パス「進捗どうですか.app/進捗どうですか」のファイルは、正しく署名されていません。
アドホック証明書や開発証明書ではなく、ディストリビューション証明書でアプリケーションに署名していることを確認してください。
Xcodeのコード署名の設定がターゲットレベルで正しいことを確認します(プロジェクトレベルの値を上書きします)。
さらに、あなたがアップロードしているバンドルは、シミュレータターゲットではなく、Xcodeのリリースターゲットを使用して構築されたことを確認してください。
コードサイニングの設定が正しいことが確認できたら、Xcodeで「Clean All」を選択し、Finderで「build」ディレクトリを削除し、リリースターゲットを再構築してください。
詳細については、https://developer.apple.com/support/code-signing を参照してください。(ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

原因

アプリ名にマルチバイト文字が含まれる場合に発生します。
参考 : Apple Developer Forums | A sealed resource is missing or invalid
以前は問題なくアップロードできていましたが、Xcode 14.2ではアップロードできませんでした。
どのタイミングで変わったのかは不明です。

修正方法

マルチバイト文字を使用しているアプリ名を変更する必要があります。
アプリ名はProduct Nameで変更可能です。
変更方法
プロジェクトのプロパティ → TARGETS → アプリ名 → Build Settings → Packaging
Product Name : 変更後の英数のアプリ名
スクリーンショット 2023-03-23 22.18.39.png

ただし、運用中のアプリでデータの保存でUserDefaultsを使用している場合、バージョンアップ前のデータが参照できなくなります。(この状態でリリースしてやらかしました。)
引き続き同じUserDefaultsを使用する場合は以下の設定にします。

変更方法
プロジェクトのプロパティ → TARGETS → アプリ名 → Build Settings + All → Packaging
Product Module Name : 変更前の日本語のアプリ名
Product Name : 変更後の英数のアプリ名
スクリーンショット 2023-03-23 22.15.33.png

その他のトライアンドエラー

試してダメだったことの記録です。

Provisioning profileの更新

署名関連のエラーでしたので、Provisioning profileを再発行してみましたが同じエラーでした。

プロジェクトのClean

エラーメッセージに記載されている

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.

通りにClean Allなどを試してみましたが同じエラーでした。

Legacy Build Systemでビルド

【IOS】Invalid Signature. A sealed resource is missing or invalid…. で紹介されている"New Build System" → "Legacy Build System"に変更する方法です。
"Legacy Build System"は廃止済み(?)であり、Xcode 14.2ではこのメニューは表示されなくなっていました。

古いバージョンのXcodeであれば利用できる可能性もありますが、試していません。

Bundle nameを変更する

プロジェクトのプロパティ → TARGETS → アプリ名 → Info → Custom iOS Target Properties
内のBundle nameを変更しましたが、結果は変わりませんでした。

2
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3