简介
Alcatraz 是一个帮你管理 Xcode 插件、模版以及颜色配置的工具。通过Alcatraz来使用插件是一件非常方面的事情,我们无需再去Github上面费劲的搜索这方面的资源,因为Alcatraz已经囊括了大部分开源出来的插件。
安装和删除
使用终端输入如下的命令行来安装 Alcatraz:
<code class="hljs vhdl has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">mkdir -p ~/<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Library</span>/Application\ Support/Developer/<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Shared</span>/Xcode/Plug-ins curl -L http://git.io/lOQWeA | tar xvz -C ~/<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Library</span>/Application\ Support/Developer/<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Shared</span>/Xcode/Plug-ins</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li></ul>
如果在终端输入以上命名没有显示安装成功话,使用下面方法:
<code class="hljs lasso has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.</span>先删除掉本地的Alcatraz,命令行如下: rm <span class="hljs-attribute" style="box-sizing: border-box;">-rf</span> ~/Library/Application Support/Developer/Shared/Xcode/Plug<span class="hljs-attribute" style="box-sizing: border-box;">-ins</span>/Alcatraz<span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">.</span>xcplugin <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.</span>再关闭掉Xcode <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">3.</span>继续输入以下命令行: curl <span class="hljs-attribute" style="box-sizing: border-box;">-fsSL</span> https:<span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">//raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">4.</span>显示安装成功后,打开xcode 如果有弹出load bundles的时候,选择load bundles(注意:不要选择<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">skip</span> bundles) 注意:<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">`使用以上步骤重新删除安装时有可能再次失败,请再次执行上列4步骤`</span>(有一次我试过两次后才成功)</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li></ul>
如果你不想使用 Alcatraz 了,可以使用如下命令来删除:
<code class="hljs vhdl has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.</span> rm -rf ~/<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Library</span>/Application\ Support/Developer/<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Shared</span>/Xcode/Plug-ins/Alcatraz.xcplugin <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.</span> rm -rf ~/<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Library</span>/Application\ Support/Alcatraz</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li></ul>
使用
安装成功后重启 Xcode,就可以在 Xcode 的顶部菜单中找到 Alcatraz,如下所示:
点击 “Package Manager”,即可启动插件列表页面,如下所示:
之后可以输入搜索想要的插件,点击 “INSTALL” 即可下载安装。
安装完成后,再次点击 “REMOVE” 图标,可以将该插件删除。
插件路径
Xcode 所有的插件都安装在目录
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/
下,你也可以手工切换到这个目录来删除插件。