14

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>

1 Answer 1

16

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.

1
  • In Xamarin Studio Add -> New File -> IOS Settings Bundle will do all of the work for you. Commented Jul 17, 2013 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.