iOS Entitlements PlistをJSONに変換する

iOSまたはmacOSのEntitlements plistファイルをJSONに変換します。アプリサンドボックス、キーチェーンアクセスグループ、プッシュ通知、Associated Domainsを解説します。

iOS Settings

詳細な説明

Entitlements Plist

EntitlementsはiOSまたはmacOSアプリケーションに付与される機能と権限を定義します。plistファイル(通常.entitlements)に保存され、コード署名時にアプリに埋め込まれます。

Plist構造

<dict>
  <key>com.apple.security.app-sandbox</key>
  <true/>
  <key>com.apple.security.network.client</key>
  <true/>
  <key>keychain-access-groups</key>
  <array>
    <string>$(AppIdentifierPrefix)com.example.myapp</string>
    <string>$(AppIdentifierPrefix)com.example.shared</string>
  </array>
  <key>aps-environment</key>
  <string>production</string>
  <key>com.apple.developer.associated-domains</key>
  <array>
    <string>applinks:example.com</string>
    <string>webcredentials:example.com</string>
  </array>
</dict>

JSON出力

{
  "com.apple.security.app-sandbox": true,
  "com.apple.security.network.client": true,
  "keychain-access-groups": [
    "$(AppIdentifierPrefix)com.example.myapp",
    "$(AppIdentifierPrefix)com.example.shared"
  ],
  "aps-environment": "production",
  "com.apple.developer.associated-domains": [
    "applinks:example.com",
    "webcredentials:example.com"
  ]
}

ブーリアンEntitlements

ほとんどのサンドボックスEntitlementsは<true/>を使用して機能を有効にします。これらはJSONブーリアンになり、アプリがどの機能を要求しているかを簡単に確認できます。

ビルド変数プレースホルダー

Entitlementsには$(AppIdentifierPrefix)のようなXcodeビルド変数が含まれることがよくあります。これらはplistとJSON両方でリテラル文字列として保持されます。コンバーターではなく、ビルドプロセス中にXcodeによって解決されます。

ユースケース

アプリバージョン間でEntitlementsを比較するセキュリティ監査、提出前にEntitlementsを検証するCI/CDパイプライン、またはアプリの権限要件のドキュメント化に不可欠です。

試してみる — Plist ↔ JSON Converter

フルツールを開く