dart-native / dart-native/dart_native
Problems initializing dart native for ios
- Dominant language
- C
- Stars
- 964
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
We have the following unit test in example/test directory of a project:
```
import "package:test/test.dart";
import 'package:dart_native/dart_native.dart';
void main() {
// Define the test
test("Testing ffi implementation of AVAudioPlayer", () {
runDartNative();
// Arrange
NSObject player = new NSObject(Class('NSObject'));
// Asset
expect(player.description, '');
});
}
```
This is failing with the following error:
```
Connecting to VM Service at http://127.0.0.1:49354/kOZquTJPEHw=/ws
Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, RegisterDeallocCallback): symbol not found)
dart:ffi DynamicLibrary.lookup
package:dart_native/src/ios/common/callback_manager.dart registerDeallocCallback
package:dart_native/…/common/callback_manager.dart:1
package:dart_native/src/ios/common/callback_manager.dart registerDeallocCallback
package:dart_native/…/common/callback_manager.dart:1
runtimeLib
package:dart_native/…/common/library.dart:17
nativeGetClass
package:dart_native/…/runtime/native_runtime.dart:41
package:dart_native/src/ios/runtime/native_runtime.dart nativeGetClass
package:dart_native/…/runtime/native_runtime.dart:1
_getClass
package:dart_native/…/runtime/class.dart:64
new Class
package:dart_native/…/runtime/class.dart:16
main.
test/avaudioplayer_test.dart:9
```
I should note I've added use_frameworks! to the podspec in the examples directory. Thanks in advance :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.