Is there any way to write to the XCode build transcript? What i want to do, is throw a warning if a device is not attached to the computer instead of an assertion failure in my unit test cases (some cases rely on an attached ipod).
I thought of something like the standard compiler warnings (only with custom message).
Thanks.
In shell build phases you can write to stderr using the following format:
<filename>:<linenumber>: error | warn | note : <message>\n
It's the same format gcc uses to show errors. The filename:linenumber part can be omitted. Depending on the mode (error, warn, note), Xcode will show your message with a red or yellow badge.
If you include an absolute file path and a line number (if the error occurred in a file), double clicking the error in the build log lets Xcode open the file and jumps to the line, even if it is not part of the project. Very handy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With