iOS Asset Catalog being cleared in Visual Studio

so it looks like this bug https://bugzilla.xamarin.com/show_bug.cgi?id=17061 is still around.
In Visual Studio 2015 with Xamarin.iOS 8.10.2.0 anything icons I set under Universal Icons get totally ignored/deleted.
I'll add the images, and the images will show up in the iOS Application pane while I'm looking at it, but the plist doesn't update to reflect my changes, and when I save/close the project settings and return then all icons have vanished again.
Makes things quite awkward to say the least.

Tagged:

Posts

  • AllisterAllister USMember ✭✭
  • AllisterAllister USMember ✭✭

    so in the end I just migrated my assets to xcassets in xamarin studio on the mac, then copied the changes back to the files on the pc, Visual Studio 2015 isn't deleting the:
    <key>XSAppIconAssets</key>
    <string>Resources/Images.xcassets/AppIcons.appiconset</string>
    <key>XSLaunchImageAssets</key>
    <string>Resources/Images.xcassets/LaunchImage.launchimage</string>
    entries in info.plist, so at least I don't have image references being dropped by visual studio anymore, I just can't change/set what images are being used unless I open the project on the mac or edit the json by hand.
    yay :-/

  • JoelAnairJoelAnair USMember ✭✭

    @Allister thanks for posting the key-value pairs from info.plist, saved me the trouble. Sure would be nice if this worked in Visual Studio, eh? Seems like a dumb thing for many of us to have spent troubleshooting. Thanks for the help.

  • JulienRosenJulienRosen CAMember ✭✭✭✭

    In my Info.Plist, I have

    <key>XSAppIconAssets</key>
    <string>Resources/Media.xcassets/AppIcons.appiconset</string>
    

    My contents.json has a bunch of images set. But my app still shows no icon on simulator or device. Any ideas?

  • AllisterAllister USMember ✭✭

    @JulienRosen just off the top of my head, depending on versions you're running, when I was running from Visual Studio using iconsets the icons wouldn't show as visual studio wouldn't recognise/use the iconsets, while copying the project to a mac and run it from xamarin studio the icons would show up.
    So bottom line, if you're running from visual studio don't stress about icons missing, but if you run/publish it on the mac and icons are still missing then some investigation may be needed.
    good luck :-)

  • JeffBowdenJeffBowden USMember

    Just struggling with this myself today. It seems if you're doing a deploy of any kind, and you're using XSAppIconAssets (.xcassets), Visual Studio will drop the assets, and your app will not have an icon. Do the same compile in Xamarin Studio on the mac, and the app icon re-appears. Be nice to see this fixed, so I can do ad-hoc deploys from VS without having to copy the whole project over to the mac.

  • john82john82 ITMember ✭✭

    This is still live. I don't know how, but after some time, some deploys, .xcassets are now totally ignored by VS 2015.
    When deploying the same source code via XS all is fine.

  • john82john82 ITMember ✭✭

    This bug is still alive in VS 20017. It seems that somehow VS decide to remove the asset catalog from the project :(

  • PeterDouglasPeterDouglas USUniversity ✭✭

    @Allister I have my icons back now, thank you! For days I couldn't figure out what had happened to them. My path to Assets was different, so I hand-tailored the plist.

  • DavidHilmerDavidHilmer USMember ✭✭

    This bug is still alive in VS 20017. I am missing more images than just the Icons! :neutral:

  • DaronRiceDaronRice USMember ✭✭
    edited April 16

    in plist, changed this line <string>Resources/Media.xcassets/AppIcons.appiconset</string> to this

    <string>Media.xcassets/AppIcons.appiconset</string> because media.xcassets was a the root level, not under the Resource folder... now it works.... Thanks for the solution @PeterDouglas

  • DanielEstebanTabordaDanielEstebanTaborda COMember ✭✭

    @DaronRice said:
    in plist, changed this line <string>Resources/Media.xcassets/AppIcons.appiconset</string> to this

    <string>Media.xcassets/AppIcons.appiconset</string> because media.xcassets was a the root level, not under the Resource folder... now it works.... Thanks for the solution @PeterDouglas

    it works for me... thanks ;)

  • gromovicgromovic Member ✭✭

    Do you have to name the folder "Media"?

  • DavidHilmerDavidHilmer USMember ✭✭

    YES!!! Thanks for the solution @PeterDouglas. That was it!!!
    I do have 1 question, Why doesn't Microsoft/Xamarin care about us? But that is a question for another blog.
    Thanks again @PeterDouglas!

Sign In or Register to comment.