Skip to content

Commit

Permalink
Fix macOS release build
Browse files Browse the repository at this point in the history
Turns out this wasn't working because macs don't have, disallow or
prevent some stuff. I've not nailed down exactly what, it seems to be
code generation and reflection oriented.

Unfortunately, that's very much needed for the Sqlite adapter, probably
other libs too.

The way the debug build works is it enables "The Interpreter" which I
have actually struggled to find much information on from a quick google,
but I guess it fills in where necessary. Downside being it's slower, but
slower is better than "the app doesn't work at all".

Here, I conditionally enable the interpreter for release builds now.

I've joined a thread about this on the MAUI Repo here:
dotnet/maui#13019 (comment)
  • Loading branch information
Rory-Reid committed Apr 30, 2023
1 parent ac8fc79 commit 9c0b8f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Basemix/Basemix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
<AndroidSigningKeyAlias>key</AndroidSigningKeyAlias>
</PropertyGroup>

<!-- Uncomment to enable the interpreter. This is needed in release if you or your dependencies use reflection -->
<PropertyGroup Condition="$(TargetFramework.Contains('-maccatalyst')) Or $(TargetFramework.Contains('-ios'))">
<UseInterpreter>true</UseInterpreter>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.png" Color="#FFFFFF" />
Expand Down

0 comments on commit 9c0b8f6

Please sign in to comment.