views:

1177

answers:

2

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"&gt;
<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>
+5  A: 

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.

CraigD
A: 

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

Where is this Build Action?

VK
Did you look at the screenshot link in my answer? Step 4 on that link shows the Properties window for the Root.plist file, which is where the settings are.
CraigD