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

Firebase.Crashlytics.StackFrame.Create(nuint address) has wrong method selector #652

@aliyailina

Description

@aliyailina

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions