本文要說的是Xcode 8下使用Alcatraz的可能性。我在搜索Xcode 8 下如何使用 Alcatraz 時,搜到了下面一個方案。

具體步驟如下:
從https://github.com/steakknife/unsign下載unsign工具,使用 make 編譯unsign,得到可執(zhí)行文件unsign
git clone https://github.com/steakknife/unsign.git
cd unsign
make
然后使用unsign為xcode移除簽名。
sudo ./unsign /Applications/Xcode.app/Contents/MacOS/Xcode
會在/Applications/Xcode.app/Contents/MacOS/下生成Xcode.unsigned,備份好原始的Xcode,把Xcode.unsigned重命名為Xcode,重啟Xcode。你就會發(fā)現(xiàn)Xcode提醒你是否加載Alcatraz的Bundle。
然后運(yùn)行以下命令
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`
重啟Xcode即可。我裝了兩個插件 Uncrustify 和Auto-Importer,目前來說是可用的。


注意
這種方法可能會導(dǎo)致Xcode不穩(wěn)定,所以還是謹(jǐn)慎使用。
更新
今天創(chuàng)建了一個測試的項(xiàng)目,用unsign過的Xcode打包,然后Upload到AppStore,沒發(fā)現(xiàn)有什么問題,Build 1 已經(jīng)可用了,只不過我沒有最終遞交Review。如果大家遇到什么問題可以在下面評論留言。

今天用的時候發(fā)現(xiàn)有些插件可能導(dǎo)致Xcode崩潰,應(yīng)該是Xcode結(jié)構(gòu)有一些變化導(dǎo)致的。