我已經從robbie hanson安裝了XcodeColors的Xcode插件。 (見https://github.com/robbiehanson/XcodeColors)如何從我的應用程序中的Xcode獲取環境變量
如果我測試它在操場
let dict = NSProcessInfo.processInfo().environment
let env = dict["XcodeColors"] as? String
ENV將是 「YES」。
但是,如果我在我的應用程序中使用相同的代碼,則env將爲零,因爲該應用程序正在其自己的進程上運行。
因爲只有在插件已安裝的情況下,我纔會打印出具有特定esc序列的彩色文本,因此我需要獲取有關Xcode env var的信息。
我該怎麼做?
我具有:
然後,你可以像在運行時訪問的Info.plist PARAM同樣的問題。你發現了一個解決方案? – Tiago 2015-03-02 22:39:41