I am using Ant to get bundle number from an iOS app. Related script is in following:
<macrodef name="get_build_property">
<attribute name="info-plist"/>
<sequential>
<exec executable="/usr/libexec/PlistBuddy"
resultproperty="app.version.bundle.number"
failonerror="false">
<arg value="-c"/>
<arg value ="Print :CFBundleVersion"/>
<arg value="@{info-plist}"/>
</exec>
<echo message="app.version.bundle.number: ${app.version.bundle.number}" />
</sequential>
</macrodef>
I can see the correct result from exec. But message from echo was always 0. I feel that PlistBuddy->Print did not set result to the resultproperty. Am I right? If so how it can be done?
Thanks in advance.
Actually I just found an answer - use outputproperty instead of resultproperty. It works after that.