question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MvvmCross 9.0.1 iOS release build crashes on device

See original GitHub issue

🔙 Regression

A release build (IPA file) of an an app crashes as soon as a MvvmCross package reference is added.

Reproduction steps

  1. Create a new app with dotnet new ios

  2. Set a valid bundle identifier in Info.plist

  3. Add a reference to MvvmCross, version 9.0.1 or 9.0.0

  4. Build an IPA file: dotnet publish testapp.csproj -f:net6.0-ios -c:Release /p:CodesignKey="Apple Development: Markus Palme (XXXXXX)" /p:CodesignProvision="Test app" /p:ArchiveOnBuild=true -r ios-arm64

  5. Install the IPA file on an iPhone, start the app

  6. The launch screen shows quicky, then the app crashes with this message being visible in the console:

    image

    error: Failed to load AOT module ‘System.Private.CoreLib’ while running in aot-only mode: doesn’t match assembly.

This is the full project file:

  <PropertyGroup>
    <TargetFramework>net6.0-ios</TargetFramework>
    <OutputType>Exe</OutputType>
    <Nullable>enable</Nullable>
    <ImplicitUsings>true</ImplicitUsings>
    <SupportedOSPlatformVersion>13.0</SupportedOSPlatformVersion>
    <MtouchLink>None</MtouchLink>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="MvvmCross" Version="9.0.1" />
  </ItemGroup>
</Project>

Configuration

Version: 9.0.0 or 9.0.01

Platform:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Cheesebaroncommented, Sep 19, 2022

@markuspalme not a lot of experience with net6-ios. Have done a bunch with net6.0-android, which works well.

0reactions
markuspalmecommented, Sep 18, 2022

@Cheesebaron What’s your experience so far with net6-ios?

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS app crashes on device in release build (IPA) #16226
A very basic iOS app crashes as soon as a Nuget package reference is added for the library MvvmCross with the error: error:...
Read more >
Xamarin iOS app crash on startup
In my case app was crashing only on the 32 bit of the device. ... Latest stable release of xamarin version was updated...
Read more >
App Crashing in IOS : r/dotnetMAUI
Created a app using .NET MAUI works fine in the Android but those same build is continuously crashing in IOS, not getting the...
Read more >
Xamarin.Android application crashes only on release
I am developing an application for ios and Android but I have a strange problem for Android: with the same parameters for the...
Read more >
VS 16.7 Xamarin Android crash on start up in debug
Just upgraded to VS 2019 16.7 and Xamarin Android project that was running fine yesterday ... It seems to be fine running with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found