Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

xcasset folder in iOS class library breaks UIImage.FromBundle in main app

tokotoko USMember ✭✭

Hello everyone,

first of all, attached you find a sample project that makes it very simple to understand the problem. See MyViewControllerInt line 26 for a description in code.

The problem is the following:

  • I have an iOS app that references one iOS class library that i created
  • If i add an xcassets folder to the class library i can not load any assets in the main app anymore -> UIImage.FromBundle returns null
  • After archiving and having a look at the file only the assets from the class library were added

@Xamarin Team: Is this supported in general, having assets in a iOS class library? Should this scenario work?

@Everyone else: Anyone experienced similar issues? Any ideas how to solve it?

Thanks a lot for your help!



  • tuyenvtuyenv VNUniversity ✭✭✭

    We faced the same issue. We workaround by include all resources in a single xcassets :).

  • tokotoko USMember ✭✭

    Thanks for your feedback!

    We are aiming for a highly modularised approach, so doing that is quite a big hit for our architecture. I'll try to get more info if this is a bug or is not supposed to work at all.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai


    This has been a known issue for a while:
    and as noted in the comments on the bug report changing this behavior will not be trivial.

Sign In or Register to comment.