Editing (augmenting) info.plist

  1. ‹ Older
  2. 4 years ago

    Greg O

    30 Jul 2015 Xojo Inc

    @Jason K Ok, for anyone else who may need this, the following works properly:
    Dim App As String = CurrentBuildLocation + "/" + CurrentBuildAppName call DoShellCommand("/usr/libexec/PlistBuddy -c ""Add :UIRequiredDeviceCapabilities:0 string gamekit"" " + App + "/Info.plist" )

    Shouldn't that be App + "/Contents/Info.plist" ?

  3. Jason K

    30 Jul 2015 Pre-Release Testers

    @Greg OLone Shouldn't that be App + "/Contents/Info.plist" ?

    For OSX yes. But iOS doesn't have a contents folder inside of the bundle to organize everything so it's not needed here.

  4. 3 years ago

    Michel B

    15 Oct 2016 Pre-Release Testers, Xojo Pro RubberViews.com
    Edited 3 years ago

    @Jason K Ok, for anyone else who may need this, the following works properly:
    Dim App As String = CurrentBuildLocation + "/" + CurrentBuildAppName call DoShellCommand("/usr/libexec/PlistBuddy -c ""Add :UIRequiredDeviceCapabilities:0 string gamekit"" " + App + "/Info.plist" )

    Well, it appears it no longer works :(

    I created a script with exactly the above, placed it after the build, info.plist is not modified.

    For the time being, I have extracted info.plist from a debug build, and from a build, and will use a copyfile to place the modified versions in the bundle.

  5. 7 months ago

    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" )

or Sign Up to reply!