0
如果plist條目不存在,我需要生成構建錯誤。我如何處理它?任何關於此的信息都會有幫助。爲plist條目編譯時間錯誤
如果plist條目不存在,我需要生成構建錯誤。我如何處理它?任何關於此的信息都會有幫助。爲plist條目編譯時間錯誤
您需要編寫一個腳本來檢查.plist
文件作爲構建的一部分。
參見Running a Script While Building a Product。
如果腳本以非零退出代碼終止(即exit 1
),則構建將失敗。
MAC OS X的已經內置的工具,您的問題: - 在/ usr/libexec目錄/ PlistBuddy
For success, it returns exit code is 0
For failure, it returns exit code is nonzero
For regular output is sent to stdout, error messages is sent to stderr
選中此[查看TODO年代和FIXME的作爲警告在Xcode中(https://deallocatedobjects.com/posts/show-todos-and-fixmes-as-warnings-in-xcode-4)的靈感。 –
@rustylepord首先檢查.Plist文檔目錄中是否存在任何元素。 –