microsoft / SmartHotel360-Mobile

SmartHotel360 Mobile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS client crashes on physical iOS device in `Debug | iPhone` configuration

kdubau opened this issue · comments

Description

The iOS client application will crash on a physical iPhone. It does not crash on the iOS simulators.

I believe the issues is related to the linker being set to "LinkAll" in Debug|iPhone configuration (which is not set in Release). If this is switched to "SdkOnly" then it works correctly on device.

See: https://github.com/Microsoft/SmartHotel360-mobile-desktop-apps/blob/master/src/SmartHotel.Clients/SmartHotel.Clients.iOS/SmartHotel.Clients.iOS.csproj#L57

Steps to reproduce

  1. Build the app in Debug | iPhone configuration
  2. Deploy it to an actual iOS device
  3. Observe crash on launch
Parameter name: type
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00039] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.11.0.313/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/activator.cs:201
  at System.Activator.CreateInstance (System.Type type) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.11.0.313/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/activator.cs:134
  at Microsoft.Identity.Client.Internal.PlatformPlugin.InitializeByAssemblyDynamicLinking () [0x00011] in <f81cee60cbea4f3b9244e8cce1eac078>:0
  at Microsoft.Identity.Client.Internal.PlatformPlugin..cctor () [0x00007] in <f81cee60cbea4f3b9244e8cce1eac078>:0
  --- End of inner exception stack trace ---
  at Microsoft.Identity.Client.AbstractClientApplication..cctor () [0x00000] in <f81cee60cbea4f3b9244e8cce1eac078>:0
  --- End of inner exception stack trace ---
  at Microsoft.Identity.Client.PublicClientApplication..ctor (System.String authority, System.String clientId) [0x00000] in <f81cee60cbea4f3b9244e8cce1eac078>:0
  at SmartHotel.Clients.App..ctor () [0x00008] in /Users/kylewhite/Workspace/SmartHotel360-mobile-desktop-apps/src/SmartHotel.Clients/SmartHotel.Clients/App.xaml.cs:27
  at SmartHotel.Clients.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x0005d] in /Users/kylewhite/Workspace/SmartHotel360-mobile-desktop-apps/src/SmartHotel.Clients/SmartHotel.Clients.iOS/AppDelegate.cs:54
  at 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 /Library/Frameworks/Xamarin.iOS.framework/Versions/11.11.0.313/src/Xamarin.iOS/UIKit/UIApplication.cs:79
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.11.0.313/src/Xamarin.iOS/UIKit/UIApplication.cs:63
  at SmartHotel.Clients.iOS.Application.Main (System.String[] args) [0x00001] in /Users/kylewhite/Workspace/SmartHotel360-mobile-desktop-apps/src/SmartHotel.Clients/SmartHotel.Clients.iOS/Main.cs:12