Skip to content

Commit

Permalink
Use a script to set DVTPlugInCompatibilityUUIDs automatically
Browse files Browse the repository at this point in the history
Yes, I guess this kinda defeats the purpose of the compatibility
UUIDs, but it's a little annoying to update this with every single
Xcode release, and if something does break, it's easy enough to
remove the plugin...
Ole Zorn committed May 23, 2015
1 parent 7b0585d commit cb56bab
Showing 2 changed files with 17 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Info.plist
Original file line number Diff line number Diff line change
@@ -24,17 +24,6 @@
<true/>
<key>XCPluginHasUI</key>
<false/>
<key>DVTPlugInCompatibilityUUIDs</key>
<array>
<string>C4A681B0-4A26-480E-93EC-1218098B9AA0</string>
<string>AD68E85B-441B-4301-B564-A45E4919A6AD</string>
<string>640F884E-CE55-4B40-87C0-8869546CAB7A</string>
<string>63FC1C47-140D-42B0-BB4D-A10B2D225574</string>
<string>37B30044-3B14-46BA-ABAA-F01000C27B63</string>
<string>A2E4D43F-41F4-4FB9-BB94-7177011C9AED</string>
<string>A16FF353-8441-459E-A50C-B071F53F51B7</string>
<string>9F75337B-21B4-4ADC-B558-F9CADF7073A7</string>
</array>
<key>XC4Compatible</key>
<true/>
</dict>
17 changes: 17 additions & 0 deletions OMColorSense.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -96,6 +96,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "OMColorSense" */;
buildPhases = (
7F1DE9FB1B10AF0900B6CBA8 /* ShellScript */,
8D5B49B1048680CD000E48DA /* Sources */,
8D5B49B3048680CD000E48DA /* Frameworks */,
);
@@ -136,6 +137,22 @@
};
/* End PBXProject section */

/* Begin PBXShellScriptBuildPhase section */
7F1DE9FB1B10AF0900B6CBA8 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /usr/bin/python;
shellScript = "import os\nimport plistlib\nimport subprocess\n\ncompat_uuid = subprocess.check_output(['defaults', 'read', '/Applications/Xcode.app/Contents/Info', 'DVTPlugInCompatibilityUUID']).strip()\n\ninfo_plist_path = os.path.join(os.getenv('BUILT_PRODUCTS_DIR'), 'OMColorSense.xcplugin/Contents/Info.plist')\ninfo = plistlib.readPlist(info_plist_path)\ninfo['DVTPlugInCompatibilityUUIDs'] = [compat_uuid]\nplistlib.writePlist(info, info_plist_path)\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
8D5B49B1048680CD000E48DA /* Sources */ = {
isa = PBXSourcesBuildPhase;

0 comments on commit cb56bab

Please sign in to comment.