众所周知Xcode8以上无法正常安装插件,只能够通过一些略嫌麻烦的渠道去实现。
1.安装Alcatraz
1.1终端中输入
rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin
1.2再输入
rm -rf ~/Library/Application\ Support/Alcatraz/
1.3接下来要安装Alcatraz,终端输入
curl -fsSLhttps://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh| sh
由于是直接访问github,所以需要注意的一点是网络问题,如果你所在的网络无法正常访问github,请科学上网,具体步骤自行解决。
2.update xcode plugins
2.1安装完成后并不能直接使用,接下来要借助update_xcode_plugins这个项目 来实现xcode8.0+上的Alcatraz正常使用。下载项目到本地,解压。

2.2 cd到目标文件夹

2.3输入
gem install update_xcode_plugins
如果出现如下错误信息,

则需要使用
sudo gem install update_xcode_plugins
如果还是出现错误,则需要输入
sudo gem install -n /usr/local/bin update_xcode_plugins
如果出现password🔑,则需要输入你的mac的密码(不可见)回车。

成功时,如上图。
2.4接着输入update_xcode_plugins,出现下图,表示成功。

2.5输入
update_xcode_plugins --unsign
有让你确认的地方“y/n”记得按y。
2.6输入
update_xcode_plugins --install-launch-agent
大功告成!

PS:update_xcode_plugins上还有一些指令可以参考,请自行参考,食用。
链接:https://www.jianshu.com/p/38a490370218
网友评论