d5697a8867
This makes diagnosing what happens much easier in some cases. Exhibit A, pre fix: *** Terminating app due to uncaught exception 'ObjCRuntime.RuntimeException', reason: 'Failed to lookup the required marshalling information. Additional information: Selector: conformsToProtocol: Type: ViewController Exhibit B, post fix: *** Terminating app due to uncaught exception 'ObjCRuntime.RuntimeException', reason: 'Failed to lookup the required marshalling information. Additional information: Selector: conformsToProtocol: Type: ViewController (ObjCRuntime.RuntimeException) Failed to get the 'this' instance in a method call to templ.ViewController.InvokeConformsToProtocol. (ObjCRuntime.RuntimeException) at Registrar.DynamicRegistrar.GetMethodDescriptionAndObject(Type type, IntPtr selector, Boolean is_static, IntPtr obj, IntPtr& mthis, IntPtr desc) at ObjCRuntime.Runtime.GetMethodAndObjectForSelector(IntPtr klass, IntPtr sel, Boolean is_static, IntPtr obj, IntPtr& mthis, IntPtr desc) at ObjCRuntime.Runtime.get_method_and_object_for_selector(IntPtr cls, IntPtr sel, Boolean is_static, IntPtr obj, IntPtr& mthis, IntPtr desc, IntPtr& exception_gchandle) Failed to marshal the Objective-C object 0x7f813fd2f470 (type: ViewController). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'templ.ViewController' does not have a constructor that takes one NativeHandle argument). (ObjCRuntime.RuntimeException) at ObjCRuntime.Runtime.MissingCtor(IntPtr ptr, IntPtr klass, Type type, MissingCtorResolution resolution) at ObjCRuntime.Runtime.ConstructNSObject[T](IntPtr ptr, Type type, MissingCtorResolution missingCtorResolution) at ObjCRuntime.Runtime.ConstructNSObject(IntPtr ptr, IntPtr klass, MissingCtorResolution missingCtorResolution) at ObjCRuntime.Runtime.GetNSObject(IntPtr ptr, MissingCtorResolution missingCtorResolution, Boolean evenInFinalizerQueue) at Registrar.DynamicRegistrar.GetMethodDescriptionAndObject(Type type, IntPtr selector, Boolean is_static, IntPtr obj, IntPtr& mthis, IntPtr desc) |
||
---|---|---|
.. | ||
xamarin | ||
.gitignore | ||
COOP.md | ||
Delegates.cs.t4 | ||
EXCEPTIONS.md | ||
Makefile | ||
README.md | ||
Xamarin.framework-iphoneos.Info.plist | ||
Xamarin.framework-iphonesimulator.Info.plist | ||
Xamarin.framework-tvos.Info.plist | ||
Xamarin.framework-tvsimulator.Info.plist | ||
Xamarin.framework-watchos.Info.plist | ||
Xamarin.framework-watchsimulator.Info.plist | ||
bindings-generator.cs | ||
bindings-generator.csproj | ||
bindings.h | ||
bindings.m | ||
coreclr-bridge.m | ||
delegates.h.t4 | ||
delegates.inc.t4 | ||
delegates.t4 | ||
exports.t4 | ||
extension-main.m | ||
frameworks.h | ||
launcher.h | ||
launcher.m | ||
libmonotouch.csproj | ||
libxammac.csproj | ||
main-internal.h | ||
mono-runtime.h.t4 | ||
mono-runtime.m.t4 | ||
monotouch-debug.h | ||
monotouch-debug.m | ||
monotouch-main.m | ||
monotouch-support.h | ||
monovm-bridge.m | ||
nsstring-localization.m | ||
product.h | ||
runtime-generated.h.t4 | ||
runtime-internal.h | ||
runtime.m | ||
shared.h | ||
shared.m | ||
slinked-list.h | ||
trampolines-arm64-asm.s | ||
trampolines-arm64-objc_msgSend.inc.s | ||
trampolines-arm64-objc_msgSend.s | ||
trampolines-arm64-objc_msgSendSuper.s | ||
trampolines-arm64.h | ||
trampolines-arm64.m | ||
trampolines-i386-asm.s | ||
trampolines-i386-objc_msgSend-copyframe.inc | ||
trampolines-i386-objc_msgSend-post.inc | ||
trampolines-i386-objc_msgSend-pre.inc | ||
trampolines-i386-objc_msgSend.s | ||
trampolines-i386-objc_msgSendSuper.s | ||
trampolines-i386-objc_msgSendSuper_stret.s | ||
trampolines-i386-objc_msgSend_stret.s | ||
trampolines-i386.h | ||
trampolines-i386.m | ||
trampolines-internal.h | ||
trampolines-invoke.m | ||
trampolines-varargs.h | ||
trampolines-varargs.m | ||
trampolines-x86_64-asm.s | ||
trampolines-x86_64-objc_msgSend-copyframe.inc | ||
trampolines-x86_64-objc_msgSend-post.inc | ||
trampolines-x86_64-objc_msgSend-pre.inc | ||
trampolines-x86_64-objc_msgSend.s | ||
trampolines-x86_64-objc_msgSendSuper.s | ||
trampolines-x86_64-objc_msgSendSuper_stret.s | ||
trampolines-x86_64-objc_msgSend_stret.s | ||
trampolines-x86_64.h | ||
trampolines-x86_64.m | ||
trampolines.m | ||
xamarin-support.m |
README.md
Native runtime
This directory contains the native runtime for Xamarin.iOS and Xamarin.Mac.
Cooperative GC
See COOP.md
Generated code
A few files are generated automatically:
delegates.h|inc, Delegates.cs
These files contain the code required to glue the native runtime and the managed runtime.
mono-runtime.m, xamarin/mono-runtime.h
These files contain code that makes other code, consumers of the mono runtime, oblivious to whether the mono runtime is linked statically, dynamically, or using dlopen at runtime.
If you need to use a new function from the Mono headers, add it to exports.t4.
If you need a new enum / constant / typedef / etc, add it to mono-runtime.h.t4.
Shipped headers
These are the headers shipped with XI/XM (they're not for public consumption, but we need them to build generated code on customers machine, in particular main.m and registrar.m)
xamarin/runtime.h xamarin/trampolines.h xamarin/main.h xamarin/xamarin.h