dart-lang / dart-lang/native

FFI will not run in release mode unless the Testability flag is set (IOS)

Open
#924 3 comments 0 reactions 0 assignees View on GitHub
package:ffi
Dominant language
Dart
Stars
275
Forks
144
Avg merge
2d 10h
Merged PRs (30d)
47

Description

Hello,
I have some C which I have used the FFI interface to reference C functions. It works perfectly in debug mode on IOS14 device and it also works perfectly on the release mode but only if I enable the testability flag. No matter what else is tried inclusive of changing the strip style to non global, the method cannot be found for the C routine. In addition, it is not C++ code so I cant specify the attribute flag.
It seems that the symbols are stripped out that references the method. Is there any other work around for this?
Tried calling: call(Pointer: address=0x122f0e160, 32, Pointer: address=0x282a955c0)
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38)
dart-lang/ffi#1 _objectNoSuchMethod (dart:core-patch/object_patch.dart:85)
dart-lang/ffi#2 speex_enc_dec.encodeAudio (package:rapid_app/speex_enc_dec.dart:166)
dart-lang/ffi#3 onStart. (package:rapid_app/main.dart:430)
dart-lang/ffi#4 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593)

Regards David.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.