Xamarin Forms app fails to run / debug on physical iPhone
I have a Xamarin Forms solution, Visual Studio 2019, on Windows 10. I have a Mac at MacInCloud for compiling purposes.
I have managed to get the iOS app to run in the simulator on the Mac (mostly, got some weird issues!)
The Android project runs fine on the simulator and has been tested on multiple physical Android devices.
When I select Debug & iPhone, I get my iPhone listed. I click it to Debug and the app is built and installed on my iPhone. Visual Studio then asks me to launch the app. I do that and the standard blue splash screen appears and Visual Studio appears to start debug mode. 5 seconds or so later, the app on my iPhone closes (actually, goes to the background) and debugging stops.
I tried setting a number of breakpoints to try and see if it's starting at all and it does not appear to be.
I get this in the Debug window, it appears to be unable to find 3 assemblies:
> 2021-05-21 10:05:48.771 Xamarin.PreBuilt.iOS[2609:1266239] Xamarin.iOS: Processing: 'start profiler: no'
2021-05-21 10:05:48.771 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.iOS: Profiler not loaded (disabled)
2021-05-21 10:05:48.766 Xamarin.PreBuilt.iOS[2609:1266239] Xamarin.iOS: Successfully received USB connection from the IDE on port 10000, fd: 6
Loaded assembly: /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.iOS.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/System.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Mono.Security.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS.exe [External]
Thread started: #2
Loaded assembly: /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS.Library.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/netstandard.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/System.Core.dll [External]
2021-05-21 10:05:49.395 Xamarin.PreBuilt.iOS[2609:1266192] Content folder: /var/mobile/Containers/Data/Application/BCE69DDC-970B-4869-8B20-A98A7F61A6AA/Documents/MyApp.iOS.content
Thread started: #3
2021-05-21 10:05:49.533 Xamarin.PreBuilt.iOS[2609:1266192] Forms app path /var/mobile/Containers/Data/Application/BCE69DDC-970B-4869-8B20-A98A7F61A6AA/Documents/MyApp.iOS.content/MyApp.iOS.exe
2021-05-21 10:05:49.534 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Platform.iOS' (culture: '')
2021-05-21 10:05:49.534 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.iOS: Unable to locate assembly 'Xamarin.Forms.Platform.iOS' (culture: '')
2021-05-21 10:05:49.535 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.iOS: Unable to locate assembly 'Firebase.CloudMessaging' (culture: '')
2021-05-21 10:05:49.535 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.iOS: Unable to locate assembly 'Firebase.CloudMessaging' (culture: '')
2021-05-21 10:05:49.536 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.iOS: Unable to locate assembly 'MyApp' (culture: '')
2021-05-21 10:05:49.536 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.iOS: Unable to locate assembly 'MyApp' (culture: '')
Loaded assembly: /private/var/mobile/Containers/Data/Application/BCE69DDC-970B-4869-8B20-A98A7F61A6AA/Documents/MyApp.iOS.content/MyApp.iOS.exe
Loaded assembly: /private/var/mobile/Containers/Data/Application/BCE69DDC-970B-4869-8B20-A98A7F61A6AA/Documents/MyApp.iOS.content/Xamarin.Forms.Platform.iOS.dll [External]
Loaded assembly: /private/var/mobile/Containers/Data/Application/BCE69DDC-970B-4869-8B20-A98A7F61A6AA/Documents/MyApp.iOS.content/Firebase.CloudMessaging.dll [External]
Loaded assembly: /private/var/mobile/Containers/Data/Application/BCE69DDC-970B-4869-8B20-A98A7F61A6AA/Documents/MyApp.iOS.content/MyApp.dll
2021-05-21 10:05:49.567 Xamarin.PreBuilt.iOS[2609:1266192] Xamarin.Forms AppDelegate name: AppDelegate
=================================================================
Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Native stacktrace:
=================================================================
0x100ed4120 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_dump_native_crash_info
0x100ecacbc - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_handle_native_crash
0x101080970 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : do_icall
0x10107f010 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper
0x101075a8c - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full
0x100ed7a60 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_sigsegv_signal_handler_debug
0x1e85b429c - /usr/lib/system/libsystem_platform.dylib : <redacted>
0x1b14ea660 - /usr/lib/libobjc.A.dylib : <redacted>
0x19c6c33b4 - /usr/lib/system/libdyld.dylib : <redacted>
0x19c6b3948 - /usr/lib/system/libdyld.dylib : <redacted>
0x19c6c3f30 - /usr/lib/system/libdyld.dylib : <redacted>
0x19c6c39c0 - /usr/lib/system/libdyld.dylib : <redacted>
0x19c6c5928 - /usr/lib/system/libdyld.dylib : <redacted>
0x19c6b6ecc - /usr/lib/system/libdyld.dylib : <redacted>
0x100e87c34 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : main
0x19c6b1cf8 - /usr/lib/system/libdyld.dylib : <redacted>
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x104fcfe88):0x104fcfe78 f6 57 c3 a8 c0 03 5f d6 00 08 40 f9 c0 03 5f d6 .W...._...@..._.
0x104fcfe88 f4 4f be a9
fd 7b 01 a9 fd 43 00 91 1f 20 03 d5 .O...{...C... ..
0x104fcfe98 08 0d 02 58 00 01 40 fd 1f 20 03 d5 21 fb 00 5c ...X..@.. ..!..\
0x104fcfea8 00 20 61 1e 65 02 00 54 e0 e7 01 30
0x101073eb0 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke
0x100edad3c - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke
0x100f892c0 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_invoke_checked
0x100f8e564 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_exec_main_checked
0x100ebf8f4 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_exec
0x101071984 - /private/var/containers/Bundle/Application/48D235AC-960C-4C55-8478-76D9ACBEC38D/MyApp.iOS.app/Xamarin.PreBuilt.iOS : xamarin_main
1f 20 03 d5 . a.e..T...0. ..
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at ObjCRuntime.Dlfcn:_dlopen <0x00026>
at ObjCRuntime.Dlfcn:dlopen <0x00010>
at Xamarin.PreBuilt.iOS.Applications:LoadFrameworks <0x0009e>
at Xamarin.PreBuilt.iOS.Applications:Main <0x00202>
at <Module>:runtime_invoke_direct_void_string[] <0x00092>
=================================================================
Thread started: <Thread Pool> #4
Thread started: <Thread Pool> #5
Thread started: <Thread Pool> #6
Thread started: <Thread Pool> #7
The app has been terminated.