📑

Xcode 26のIntelligenceを無効にする方法

に公開

Xcode 26がリリースされて、Xcode内からClaudeとChatGPTを呼び出せるようになりました。
IDEに統合されているということもあって、使い心地は良かったです。

エンタープライズでの課題

ありがたい機能の一方で、ログインなし/個人アカウント等でIntelligenceを機能を利用するとモデルプロバイダーの学習に使われてしまう可能性があります。

コンプライアンスやガバナンスの観点・使うための社内整理に時間がかかる等、一時的に制約をつけたい場合もあるかと思います。

プロファイルを使ってXcodeのIntelligenceを無効にする

公式ドキュメントに無効にする方法の記載がありました。

If you need to disable the coding assistant for managed devices, set the CodingAssistantAllowExternalIntegrations key to false in a mobile device management (MDM) profile.

https://developer.apple.com/documentation/xcode/writing-code-with-intelligence-in-xcode

CodingAssistantAllowExternalIntegrationsをfalseにすることで無効にすることができそうです。

実際にプロファイルをInstallして試した結果

自作したプロファイルをインストールしてみたところ、Intelligenceが無効になりました

プロファイルを作成する方法

Profile Exampleを参考に作成していきます

https://developer.apple.com/documentation/devicemanagement/restrictions#Profile-example

Point

  1. CodingAssistantAllowExternalIntegrationsfalseにすること
  2. PayloadTypeの値をcom.apple.dt.Xcodeにすること
  3. ファイル拡張子をmobileconfigにすること

作成後、プロファイルをInstallするとIntelligenceが無効になるかと思います。

プロファイル例

<?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>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>CodingAssistantAllowExternalIntegrations</key>
            <false/>
            <key>PayloadDisplayName</key>
            <string>XcodeのIntelligenceを無効にします</string>
            <key>PayloadIdentifier</key>
            <string>com.apple.dt.Xcode.B8E0011A-B11E-4A4A-8A8A-C949D1E042F0</string>
            <key>PayloadType</key>
            <string>com.apple.dt.Xcode</string>
            <key>PayloadUUID</key>
            <string>53bec1be-ffec-4f88-acbd-b02aee8f04a9</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
        </dict>
    </array>
    <key>PayloadDisplayName</key>
    <string>Disable Xcode Intelligence</string>
    <key>PayloadIdentifier</key>
    <string>com.example.myprofile</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>6020206c-12c2-4ada-987a-dd4c560ca73a</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
</dict>
</plist>

まとめ

プロファイルを作成することで、Intelligenceを無効にすることができました。
利便性の高い機能なので社内の環境を整備して、心置きなく使えるようにしていきたいです

Discussion