2016-09-14 188 views
4

在使用CGBitmapContextCreate我得到錯誤的XCode如何設置CGBITMAP_CONTEXT_LOG_ERRORS環境變量?

CGBitmapContextCreate:不支持的參數組合:設置 CGBITMAP_CONTEXT_LOG_ERRORS環境變量查看詳情

如何設置這個變種?

我試過 launchctl setenv CGBITMAP_CONTEXT_LOG_ERRORS /Users/user/Documents/cgbitmap_errors.loglaunchctl setenv CGBITMAP_CONTEXT_LOG_ERRORS 1並重新啓動XCode沒有成功。

我也試圖與defaults write com.apple.dt.Xcode UseSanitizedBuildSystemEnvironment -bool NO組合,沒有成功過

我重新啓動計算機太

回答

10

環境變量可以在產品方案編輯器(在Xcode)這樣設置在屏幕截圖所示:

產品>方案>編輯方案...(⌘<) Scheme editor screenshot