Wrappers not found in hot restart-enabled build for MAUI
A customer has provided us with a repro for a crash happening when building an app with hot restart enabled. It can be found at https://github.com/rsteinbakk/Realm-MAUI-Iphone-HotRestart-Issue and the problem happens when you build and deploy from a windows machine. It doesn't happen when I build on my Mac (though that doesn't have hot restart enabled, so that could be why). When we try to lookup anything from the wrappers we get a dllnotfound exception. What's interesting is that an .ipa built with hot reload has a bunch of .dlls and native dependencies stuffed in AppName.content folder, while a properly built .ipa will have those in a Frameworks folder.
Hot Reload != Hot Restart.
They are 2 different technologies.
Hot Restart uses a prebuild/presigned app from Microsoft that plays the role of a client displaying things, and VS plays the role of a server serving this client. It has much more limitations than standard hot reload.
Hot Reload uses an xcode fresh built app, and adds a client for the VS hot reload server.
Maybe fixyour issue title ?
Good point - I'll update the issue.
Is there any workaround for this?
Not at the moment.
see https://learn.microsoft.com/en-us/dotnet/api/system.reflection.metadata.metadataupdatehandlerattribute?view=net-8.0 to get hot reload notifications in app.