Bug 6318 - custom changes to info.plist are randomly lost
Summary: custom changes to info.plist are randomly lost
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: PC Mac OS
: Highest major
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2012-07-29 10:48 UTC by David N. Junod
Modified: 2012-09-10 17:00 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description David N. Junod 2012-07-29 10:48:56 UTC
MonoDevelop is losing custom changes to Info.plist.

I have 3 different versions of my application that are built from the same code base.  I place some information into the Info.plist that I extract at runtime.

This is saved:
ASVersionCheckUrl (string) http://wheresthekaraoke.com/version/wtkjams-appstore.txt

This is lost:
ASVersionCheckUrl (string) http://wheresthekaraoke.com/version/wtkjams-lite-appstore.txt

This is lost:
ASVersionCheckUrl (string) http://wheresthekaraoke.com/version/wtkjams-ke-appstore.txt
Comment 1 Mikayla Hutchinson [MSFT] 2012-07-31 14:30:16 UTC
How are you making these changes?
Comment 2 David N. Junod 2012-07-31 14:35:32 UTC
I initially did it by opening the plist with a text editor and just adding the .xml.

When I saw that Mono was stripping it out on open, then I tried editing using Mono's Info.plist editor the Advanced tab.
Comment 3 Jeffrey Stedfast 2012-08-07 17:06:38 UTC
did the Advanced tab editor work? Can you show me what your xml looked like (in the case where it got stripped out)?
Comment 4 David N. Junod 2012-08-12 06:06:47 UTC
no. the advanced tab editor doesn't work.

Try the text from initial post where I say "This is lost".
Comment 5 Jeffrey Stedfast 2012-08-12 08:22:19 UTC
It was unclear to me whether it worked or not, you just said that you tried it (which, in hindsight, likely suggested it didn't work or you probably wouldn't have submitted the bug report - so for that, I'm sorry, I can be a little slow sometimes).

Could you paste the raw xml of the Info.plist that you modified via text editor? It's just that I'm so far unable to reproduce it and don't know if it is the specific key (maybe we have broken handling of some key or another) or what.

I'd really like to get this fixed as quickly as possible (it seems pretty important that our Info.plist editor work properly), but without a test case, it's a lot harder.
Comment 6 Jeffrey Stedfast 2012-08-12 08:30:21 UTC
Hmmm, it occurred to me that *perhaps* (and it's just a wild guess) that maybe the line endings in the text varied between \n and \r\n? Perhaps the XML parser that we used to use for loading Info.plist files was broken in that respect (MonoDevelop 3.0.4 uses Apple's APIs for parsing plist files, which might have fixed this).
Comment 7 Jeffrey Stedfast 2012-08-12 17:30:39 UTC
bumping the priority on this
Comment 8 David N. Junod 2012-08-12 17:34:35 UTC
Did you try adding each of the initial examples to your Info.plist using the MonoDevelop editor?

Enter them in using ASVersionCheckUrl1, ASVersionCheckUrl2, ASVersionCheckUrl3, close the dialog and then reopen, see what is still there.

I'm pedal to the metal on my Mono Android project and can't go digging in it right now (very limited time).
Comment 9 Jeffrey Stedfast 2012-08-12 17:36:45 UTC
Not yet, I'm home sick with the flu - but I wanted to bump the priority on this so that when I get back to work it will be at the top of my list of things to look into.

Good luck on your Mono for Android project!
Comment 10 David N. Junod 2012-08-13 14:33:32 UTC
I just tried my initial example using a MonoMac project with MonoDevelop and Xcode 4.4.1 (1488) with no MonoTouch.  It worked correctly for all 3 URLs.  I opened/closed several times and it is properly retaining the properties.
Comment 11 Jeffrey Stedfast 2012-09-10 17:00:19 UTC
This appears to be fixed now that we switched away from using our own XML parser on the Info.plist files and are now using Apple's plist loader. uses the MonoMac binding for the plist loader APIs.

I don't seem to be able to reproduce anymore.