How do I prevent plist optimization in Xamarin.Mac?

swintersswinters USMember ✭✭

I found this forum post: https://forums.xamarin.com/discussion/56812/plists-in-bundle-are-automatically-converted-to-binary-format

I have tried both options there and they still seem to output the binary plist file. Has anyone had any luck with this?

Xamarin Studio Professional
Version 6.3 (build 864)
Xamarin.Mac
Version: 3.4.0.36

Best Answer

Answers

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Can you post an example project where you are trying to use this option along with the build log (both on a pastebin/gist service not inline)?

  • swintersswinters USMember ✭✭

    Here you go:
    https://gist.github.com/swinters123/c714d4b1dfbeaa3f2db993814fe2070d

    I just created an example project and set the info.plist as a bundle resource with optimize set to false. I basically just need the file in whatever.app/Contents/Info.plist to be xml instead of encoded. In the mean time, I've added a line to my buildscript to convert it.
    plutil -convert xml1 Info.plist

    It would be nice to know the proper setting though.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    So it appears the plist optimization code currently does not honor Info.plist changes.

    We can file a bug for that as a feature request, but I have to ask first - "Why do you care? What use case requires it to be in xml?"

  • swintersswinters USMember ✭✭

    Replacing a objective-c/ruby OS X app. There is another app that checks it's info.plist for some information (and apparently can only do it when not encoded). I need to be able to replace it without breaking the existing app.

    For now the conversion after the fact works fine, I just noticed the setting wasn't working.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    You could use this sample to integrate your work around into the build before signing:

    https://github.com/xamarin/mac-samples/tree/master/UseMSBuildToCopyFilesToBundleExample

    which might be easier to do long term.

Sign In or Register to comment.