Question

I'm trying to get the iPhone Settings working in a small test app I'm writing using MonoTouch/MonoDevelop. It's probably super basic/fundamental in Xcode...

...however I didn't immediately see how to do it in the MonoTouch examples, and after a bit of reading guessed that a Settings.bundle folder in the root of my MonoDevelop solution that contained a root.plist xml file should work.

It kinda did - my app now appears in the Settings window - but the actual inputs don't show up. I've tried a few different things in the plist (from google & Beginning iPhone Development book) but no luck so far.

Can someone point out what I've missed: either a step in the MonoTouch solution/build process or errors the format/content of my root.plist file?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Title</key>
    <string>iSOFlair</string>
    <key>StringsTable</key>
    <string>Root</string>
    <key>PreferenceSpecifiers</key>
    <array>
        <dict>
            <key>Type</key>
            <string>PSTextFieldSpecifier</string>
            <key>Title</key>
            <string>User Id</string>
            <key>Key</key>
            <string>soUserId</string>
            <key>AutocapitalizationType</key>
            <string>None</string>
            <key>AutocorrectionType</key>
            <string>No</string>
        </dict>
    </array>
</dict>
</plist>
Was it helpful?

Solution

Okay I figured it out -- in addition to:

  1. Creating the Settings.bundle folder
  2. Creating the Root.plist in the correct format (ie including correct spelling!)

I also set the Build Action in MonoDevelop to 'Content' and the Copy to output directory to 'Always copy' to get the IDE to copy the plist TO THE DEVICE! Pretty obvious in hindsight.

I've posted screenshots of the steps and a working Root.plist file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top