I'm just posting this in case anyone else wants to do the same...

I was looking for a way to display the bundle version for the app in the
settings. After a bit of research it is easier than I first thought. Here is
what I did...

Step 1:
Add a Version section at the start of your Settings.bundle Root.plist.
Example follows...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot;
&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;>
<plist version="1.0">
<dict>
        <key>PreferenceSpecifiers</key>
        <array>
                <dict>
                        <key>DefaultValue</key>
                        <string>1.1</string>
                        <key>Key</key>
                        <string>AppVersion</string>
                        <key>Title</key>
                        <string>Version</string>
                        <key>Type</key>
                        <string>PSTitleValueSpecifier</string>
                </dict>
        </array>
</dict>
</plist>


Step 2:
Add the following as the command for a "before build" custom command for the
project

/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:0:DefaultValue
${BundleVersion}" Settings.bundle/Root.plist

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Displaying-Bundle-Version-in-Settings-Solved-FYI-tp4656018.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to