1.
Update MvvmCross to 5.4.0
2.
Build then run app on real iOS device
3.
Get the crush
The app should work
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
Version: 5.4.0
Platform:
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.
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