Mvvmcross: iOS application crashes when start running on real device

Created on 3 Nov 2017  路  4Comments  路  Source: MvvmCross/MvvmCross

Steps to reproduce

1.
Update MvvmCross to 5.4.0

2.
Build then run app on real iOS device

3.
Get the crush

Expected behavior

The app should work

Actual behavior

The app crashes with the exception:
The type initializer for MvvmCross.Core.Platform.LogProviders.ConsoleLogProvider' threw an exception.
at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
at MvvmCross.Core.Platform.MvxSetup.CreateLogProvider () [0x00029] in <68c6fe7539fa471eb0fb4e1ad2630d0d>:0
at MvvmCross.Core.Platform.MvxSetup.InitializeDebugServices () [0x00012] in <68c6fe7539fa471eb0fb4e1ad2630d0d>:0
at MvvmCross.Core.Platform.MvxSetup.InitializePrimary () [0x000a0] in <68c6fe7539fa471eb0fb4e1ad2630d0d>:0
at MvvmCross.Core.Platform.MvxSetup.Initialize () [0x00000] in <68c6fe7539fa471eb0fb4e1ad2630d0d>:0
at ILive.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00024] in /Users/macadmin1/Documents/ILive/ILive/ILive.iOS/AppDelegate.cs:38
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5481/12e80e01/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5481/12e80e01/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at ILive.iOS.Application.Main (System.String[] args) [0x0000d] in /Users/macadmin1/Documents/ILive/ILive/ILive.iOS/Main.cs:24

Configuration

Version: 5.4.0

Platform:

  • [x] iOS
  • [isn't tested] Android
  • [isn't tested] WPF
  • [isn't tested] UWP
  • [isn't tested] MacOS
  • [isn't tested] tvOS
  • [isn't tested] Xamarin.Forms
invalid

Most helpful comment

@neminush Can you try replacing your LinkerPleaseInclude file with this one? https://github.com/MvvmCross/MvvmCross/blob/develop/nuspec/iOSContent/LinkerPleaseInclude.cs.pp

All 4 comments

The problem still exists in 5.4.2.

@neminush Can you try replacing your LinkerPleaseInclude file with this one? https://github.com/MvvmCross/MvvmCross/blob/develop/nuspec/iOSContent/LinkerPleaseInclude.cs.pp

@nmilcoff Updating LinkerPleaseInclude fixes problem. Thanks.

Was this page helpful?
0 / 5 - 0 ratings