This repository was archived by the owner on May 1, 2024. It is now read-only.

Description
Calling Firebase.Crashlytics.StackFrame.Create(nuint address) causes unrecognized selector exception.
[Export] attribute has wrong selector parameter stackFrameWithAddress:address, while it must be stackFrameWithAddress:.
Workaround
You can invoke method directly as described in documentation.
Declare this method somewhere (usually, in class where you use it):
[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")]
internal static extern IntPtr IntPtr_objc_msgSend_UIntPtr(IntPtr receiver, IntPtr selector, UIntPtr arg1);
Then use it like this:
using ObjCRuntime;
using Firebase.Crashlytics;
...
var stackFramePointer = IntPtr_objc_msgSend_UIntPtr(new Class(typeof(StackFrame)).Handle, Selector.GetHandle("stackFrameWithAddress:"), (UIntPtr)address);
var stackFrame = Runtime.GetNSObject<StackFrame>(stackFramePointer);