Open RyanHir opened 2 days ago
For now, ffigen 13 and objective_c 1.1.0 appear to be working for me.
I think the handler
is being GC'd early. If so, as a workaround you could try to force the compiler to keep it alive. For example, you could store the handler
in a global variable until it's invoked. @RyanHir Can you give that a try and let me know if it works? That will help me narrow down the issue.
Probably related to https://github.com/dart-lang/native/pull/1442
During release build, usage of the ObjCBlock listener method that is generated by the ffigen tool causes an exception to be thrown. This is not present when using a debug build.
Crash Log
Code Snippet
Versions Dart: 3.5.3 Flutter: 3.24.3 objective_c: 2.0.0 ffi: 2.1.3 ffigen: 14:0