The version properties Xojo has do not map nicely to the version properties Apple wants. Here are a couple of scripts that the values in the Info.plist file.
Thanks to some previous posts for ideas.
MakeVersion:
[code]Dim v() As String
Var v1 As String
Var v2 As String
v.append PropertyValue(“App.MajorVersion”)
v.append “.”
v.append PropertyValue(“App.MinorVersion”)
v.append “.”
v.append PropertyValue(“App.BugVersion”)
v1 = Join(v,"")
v.append " ("
v.append PropertyValue(“App.NonReleaseVersion”)
v.append “)”
v2 = Join(v,"")
PropertyValue(“App.Version”) = v1 // Version in plist
ConstantValue(“App.kVersion”) = v2 // Version to display to user (includes build)[/code]
SetVersion:
[code]Var build As String = PropertyValue(“App.NonReleaseVersion”)
Var App As String = CurrentBuildLocation + “/” + CurrentBuildAppName
Var cmd As String = "/usr/libexec/PlistBuddy -c ""Set :CFBundleVersion “” " + App + “/Info.plist”
cmd = cmd.Replace("",build)
Call DoShellCommand(cmd)[/code]
How to Use:
You need to create the kVersion constant in the App class.
Under build settings->iOS
Place MakeVersion before the Build step
Place SetVersion after the Build step
It does appear to work. I’ve gotten one app through Beta review.
Hope this is of use.