Reputation: 5801
I need to generate a build error if a plist entry is not present. How can I approach it ? Any information on this would helpful.
Upvotes: 0
Views: 49
Reputation: 9246
MAC OS X's has already a built in tool for your issue :- /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
Upvotes: 0
Reputation: 122458
You need to write a script that checks the .plist
file as part of the build.
See Running a Script While Building a Product.
If the script terminates with a non-zero exit code (i.e. exit 1
) then the build will fail.
Upvotes: 2