I was using the information in this thread to try to make my own mods to my app's plist file, and discovered a couple of gotchas along the way which may possibly be of interest to others following in the same footsteps:
(1) My app’s name had spaces in it, and looking at the Xojo build step command, whilst CurrentBuildLocation produces an escaped path, it looks as though CurrentBuildAppName is not escaped. So I had to do it myself, with the crude but seems to work addition of
CurrentBuildAppName.ReplaceAll( " ", "\ " )
(2) As pointed out above, if using this on OSX, don't forget to add the Contents folder to your path.
(3) I had to add in the ".app" extension to the path
Putting these together with the example GameKit command above, I found this worked for me (on OSX):
Dim App As String = CurrentBuildLocation + "/" + CurrentBuildAppName.ReplaceAll( " ", "\ " )
call DoShellCommand("/usr/libexec/PlistBuddy -c ""Add :UIRequiredDeviceCapabilities:0 string gamekit"" " + App + ".app/Contents/Info.plist" )