Thank you eskimo. The usage of the command was not proper. Now, it worked for me.
I had used initially:
osacompile -x <MyAppleScriptPath.scpt>
It should have been osacompile -x -o <MyAppleScriptReadOnlyPath.scpt> <MyAppleScriptPath.scpt>
But, why it does not work via XCode Build Settings?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: