coiai Logo
coiai

Electron Apple Store にデリバリができない

問題の概要

ElectronアプリをMac App Storeにアップロードしようとしていますが、App Sandboxが有効になっていないというエラーが発生し、解決できていません。

エラーメッセージ

Validation failed (409)

App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list: [

"coiai.net.sonivium.pkg/Payload/Sonivium.app/Contents/Frameworks/Sonivium Helper (GPU).app/Contents/MacOS/Sonivium Helper (GPU)",

"coiai.net.sonivium.pkg/Payload/Sonivium.app/Contents/Frameworks/Sonivium Helper (Plugin).app/Contents/MacOS/Sonivium Helper (Plugin)",

"coiai.net.sonivium.pkg/Payload/Sonivium.app/Contents/Frameworks/Sonivium Helper (Renderer).app/Contents/MacOS/Sonivium Helper (Renderer)",

"coiai.net.sonivium.pkg/Payload/Sonivium.app/Contents/Frameworks/Sonivium Helper.app/Contents/MacOS/Sonivium Helper",

"coiai.net.sonivium.pkg/Payload/Sonivium.app/Contents/Library/LoginItems/Sonivium Login Helper.app/Contents/MacOS/Sonivium Login Helper",

"coiai.net.sonivium.pkg/Payload/Sonivium.app/Contents/MacOS/Sonivium"

環境情報

– **OS**: macOS (darwin 25.0.0)

– **Electron**: 39.2.7

– **electron-builder**: 25.1.8

– **アプリID**: `coiai.net.sonivium`

– **Team ID**: `45J6U33V86`

現在の設定

package.json (mas設定)

"mas": {

"category": "public.app-category.utilities",

"icon": "logo/Output/macOS/AppIcon.appiconset/Icon-mac-512.png",

"hardenedRuntime": true,

"gatekeeperAssess": false,

"entitlements": "build/entitlements.mas.plist",

"entitlementsInherit": "build/entitlements.mas.plist",

"target": [

{

"target": "mas",

"arch": ["arm64", "x64"]

}

],

"bundleVersion": "1",

"extendInfo": {

"LSHasLocalizedDisplayName": true,

"CFBundleDevelopmentRegion": "ja",

"CFBundleURLName": "coiai.net.sonivium",

"ElectronTeamID": "45J6U33V86"

},

"electronLanguages": ["ja", "en"],

"identity": "Apple Distribution: Akira Hattori (45J6U33V86)",

"preAutoEntitlements": false

}

build/entitlements.mas.plist

“`xml

<?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”>

<plist version=”1.0″>

<dict>

<!– App Store用のentitlements – App Sandboxは必須 –>

<key>com.apple.security.app-sandbox</key>

<true/>

<key>com.apple.security.cs.allow-jit</key>

<true/>

<key>com.apple.security.cs.allow-unsigned-executable-memory</key>

<true/>

<key>com.apple.security.cs.allow-dyld-environment-variables</key>

<true/>

<key>com.apple.security.cs.disable-library-validation</key>

<true/>

<key>com.apple.security.device.audio-input</key>

<true/>

<key>com.apple.security.network.client</key>

<true/>

<key>com.apple.security.files.user-selected.read-write</key>

<true/>

<key>com.apple.security.files.downloads.read-write</key>

<true/>

</dict>

</plist>

“`

試した解決策

1. entitlementsInheritの設定

最初は別のファイル(`entitlements.mas.child.plist`)を指定していましたが、エラーが続いたため、メインのentitlementsファイルと同じファイルを指定するように変更しました。

“`json

“entitlementsInherit”: “build/entitlements.mas.plist”

“`

2. 証明書の確認

– ✅ **Apple Distribution**: キーチェーンに存在し、`package.json`で指定済み

– ✅ **Mac Installer Distribution (3rd Party Mac Developer Installer)**: キーチェーンに存在

– ⚠️ `security find-identity -v -p codesigning`では表示されないが、キーチェーンアクセスには表示される

3. ビルドコマンド

“`bash

npm run build:mas

“`

これで`release/mas-arm64/`に`.pkg`ファイルが生成されます。

4. コード署名の確認

`identity`を明示的に指定しています:

“`json

“identity”: “Apple Distribution: Akira Hattori (45J6U33V86)”

“`

問題点

1. **メインアプリにはentitlementsが適用されている**が、**ヘルパーアプリ(Helper apps)に適用されていない**

2. `entitlementsInherit`を設定しているにもかかわらず、ヘルパーアプリに`com.apple.security.app-sandbox`が適用されていない

3. `electron-builder`の`mas`ターゲットを使用しているが、ヘルパーアプリへのentitlements適用が正しく動作していない

確認したこと

### ビルド後のentitlements確認

以下のコマンドでヘルパーアプリのentitlementsを確認しましたが、結果はまだ確認していません:

“`bash

codesign -d –entitlements – release/mas-arm64/Sonivium.app/Contents/Frameworks/Sonivium\ Helper\ \(GPU\).app/Contents/MacOS/Sonivium\ Helper\ \(GPU\)

“`

参考にした資料

– [Electron公式ドキュメント – Mac App Store Submission Guide](https://www.electronjs.org/ja/docs/latest/tutorial/mac-app-store-submission-guide)

– [electron-builder公式ドキュメント](https://www.electron.build/)

– [Qiita – ElectronアプリをMac AppStoreに登録する](https://qiita.com/bontaro_1/items/cbe29883900740eb9859)

ヘルプを求めていること

1. **なぜ`entitlementsInherit`が機能しないのか?**

– `electron-builder`の`mas`ターゲットで、ヘルパーアプリにentitlementsを適用する正しい方法は?

2. **代替手段はあるか?**

– `electron-builder`の設定以外で、ヘルパーアプリにentitlementsを適用する方法は?

– ビルド後に手動でentitlementsを適用する方法は?

3. **設定の見落としはないか?**

– `package.json`の`mas`設定に不足している設定はないか?

– `entitlements.mas.plist`に不足している設定はないか?

4. **electron-builderのバージョン問題?**

– `electron-builder` 25.1.8で既知の問題はあるか?

– 他のバージョンで解決した事例はあるか?

5. **Electron 39.2.7との互換性**

– Electron 39.2.7と`electron-builder` 25.1.8の組み合わせで問題はないか?

追加情報

– ビルドは成功し、`.pkg`ファイルは生成される

– コード署名も成功している(`identity`を指定しているため)

– App Store Connectへのアップロードは成功するが、バリデーションでエラーが発生する

お願い

この問題を解決するためのアドバイスや、同様の問題を経験された方の解決方法を教えていただけると助かります。

特に、`electron-builder`の`mas`ターゲットで、Electronアプリのヘルパーアプリに確実にentitlementsを適用する方法について、具体的な解決策を求めています。

投稿日: 2026年1月16日
カテゴリ: 未分類
タグ:
coiai

coiai

この記事もおすすめ

この記事を書いた会社

株式会社coiaiは、「想像できることを美しく実現」を掲げ、XR・Web・アプリ・システム開発およびDX支援を行う会社です。 創業2022年、東京都練馬区に本社を置き、要件のヒアリングからPoC(概念実証)、本番運用まで一貫して伴走します。 まずはお気軽にご相談ください。

商号株式会社 coiai創業2022年1月設立2025年1月23日資本金1,500,000円(設立時点)本社所在地東京都練馬区関町北 3-6-9代表者代表取締役 竹村 啓佑 / 代表取締役 服部 陽良

主なご相談内容

会社概要・役員紹介を見る

詳しい会社情報は会社概要ページでご覧いただけます。

資料請求・無料相談

導入要件のヒアリングからPoC、本番運用まで伴走します。まずはお気軽にご相談ください。

お問い合わせの前に 個人情報保護方針 をご確認ください。