Xcode plug-in failure solution after Xcode is upgraded or re-installed. xcode plug-in
Summary: After Xcode is upgraded, the system prompts loadbundle or Skipbundle when you open Xcode. Generally, we select loadbudle. The Xcode plug-in is still valid. If you select Skipbundle, The Xcode plug-in will become invalid. Someone wants to install two versions of Xcode, and the installed version will also become invalid.
I. Causes of Xcode plug-in failure
The original plug-in is not deleted after the upgrade or re-installation. In fact, the plug-in is still in this directory ~ /Library/Application Support/Developer/Shared/Xcode/Plug-ins. The reason why the plug-in is invalid is that each plug-in is only used by Xcode of a specific UUID, And the uuid changes after the update, so it cannot be used normally.
Ii. Solution
1. view the uuid of the current Xcode
Run defaults read/Applications/Xcode. app/Contents/Info DVTPlugInCompatibilityUUID on the terminal to obtain a UUID. Maybe your Xcode is not installed by you. Instead, you can directly copy the Xcode installed by someone else to your application. If this command does not get the Xcode uuid, the following problems may occur:
In another way, you can also get the uuid of Xcode. Find Xcode in the application, right-click the content of the display package, find the Info. plist file, and find the value corresponding to DVTPlugInCompatibilityUUID.
2. Modify the uuid of the plug-in to the uuid of the current Xcode.
Find this directory ~ /Library/Application Support/Developer/Shared/Xcode/Plug-ins, find the corresponding Plug-in, right-click the package content, and find Info. open the plist file and find the DVTPlugInCompatibilityUUIDs project. add an Item. The Value of the Item is the UUID of Xcode and save it.
3. After restarting Xcode, the system will prompt "Load bundle" and "Skip Bundle". You must select "Load bundle" here. Otherwise, the plug-in will not work. If you accidentally click the Skip Bundle, delete the line of Item you just added in the plug-in plist file, restart Xcode, and then restart the previous step. Now the problem has been solved perfectly. Some may ask: if many plug-ins are invalid and you don't want to modify them one by one, is there any quick method? If yes, please refer to the next step.
3. Update the DVTPlugInCompatibilityUUID command of the plug-in batches (sudo mode is recommended)
You cannot use the defaults read/Applications/Xcode. app/Contents/Info DVTPlugInCompatibilityUUID command on the terminal to obtain the uuid. This method is not applicable. Batch modify command
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
Okay. The problem is over.
Copyright Disclaimer: This article is original to the author. You are welcome to share it with me. Please respect the work of the author. Keep this note and the author's blog link when reprinting. Thank you!