Sample MAUI app throws Xamarin.iOS FileNotFoundException (v4.5.3)

When debugging the SQLCipher.Example Maui sample on an iOS simulator, a FileNotFoundException is thrown every time a XAML page is loaded. The exception is handled, but is visible when running with catch all exceptions.

Exception is caused by SQLitePCLRaw.lib.sqlcipher 4.5.3 which has a Xamarin.iOS dependency. The question is Why does a MAUI app need Xamarin.iOS? Xamarin.iOS is part of Xamarin Forms and should not be used in MAUI. Looks like a bug to me.

Could not find `Xamarin.iOS` referenced by assembly `SQLitePCLRaw.lib.sqlcipher, Version=, Culture=neutral, PublicKeyToken=null`.

Full stack:

System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.iOS, Version=, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' or one of its dependencies.
   at System.Reflection.CustomAttribute.GetCustomAttributesBase(ICustomAttributeProvider obj, Type attributeType, Boolean inheritedOnly)
   at System.Reflection.CustomAttribute.GetCustomAttributes(ICustomAttributeProvider obj, Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttributes(Assembly element, Type attributeType)
   at Microsoft.Maui.Controls.Xaml.XamlParser.GatherXmlnsDefinitionAttributes()

Hello @koen - thank you for the report. We will look into this issue and get back to you as soon as possible.

Any news on this issue?

Hello @koen - we’re still working on tracking this down, but should have additional information soon. In the meantime, since you are using SQLCipher Commerical Edition libraries, would you email us at to open up a private case about this where we can communicate?