升级Xcode8之后会发现,在Xcode8中所有第三方插件都失效了,xcode8增加了安全相关的检查,并且连之前菜单栏的插件选项也不存在了。在之前很多iOS开发者,都是通过Alcatraz来管理插件的,现在Alcatraz也是不可用的。但是Xcode8自身也对编译器进行了升级,将一些比较好的插件功能加入到Xcode中,例如单行高亮显示等。
在Xcode8中支持了开发插件工程,并且为我们提供了一个插件模板,开发的插件可以上传到App Store下载。苹果这么做有一个原因在于,之前Xcode和插件是运行在同一个进程的,所以插件的崩溃也会导致Xcode崩溃。苹果现在将插件作为一个单独的应用程序,分开进程运行,不会对Xcode带来其他影响。
1477274305867510.png
但是,如果我就是想继续使用Alcatraz,怎么办?(别急,方法肯定是有的)
1 Close Xcode 右键退出
2 准备一个code 证书
2.1 打开钥匙串,KeyChain Access -> Certificate Assistant ->create a certificate
2.2 select "Code Signing" for Certificate Type.
Paste_Image.png3 Re-signing Xcode
打开终端
$ sudo codesign -f -s XcodeSigner /Applications/Xcode.app
注意 ⚠️你的命名是不是XcodeSigner,可以自定义。
4 Download XVim
$ git clone https://github.com/XVimProject/XVim.git
5 Confirm xcode-select points to your Xcode
$ xcode-select -p/Applications/Xcode.app/Contents/Developer
6 Make XVim
$ make
7 下载Alcatraz 或者其他插件,打开 build。
关闭 Xcode
8 最后一步
$ 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.plist DVTPlugInCompatibilityUUID
9 重新打开Xcode,load
10.Alcatraz 安装成功
lALOpR2Hy80CAc0CYQ_609_513.png_620x10000q90g.jpgGood Luck.
网友评论
/Applications/Xcode.app: resource fork, Finder information, or similar detritus not allowed是什么情况?
xcode-select -p/Applications/Xcode.app/Contents/Developer
xcode-select: error: invalid argument '-p/Applications/Xcode.app/Contents/Developer'
Usage: xcode-select [options]
Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).
Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
make
make: *** No targets specified and no makefile found. Stop.
这是什么意思?
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer