Skip to content

Commit

Permalink
Fix macOS library loading issue (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
donpui authored Jan 24, 2023
1 parent 6c3d0b3 commit ab25b07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/client/native_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ class Config {
}

class NativeClient {
//late final DynamicLibrary _wormholeWilliamLib;
// ignore: unused_field
late final DynamicLibrary _wormholeWilliamLib;
late final DynamicLibrary _asyncCallbackLib;

late final Config config;
Expand All @@ -150,6 +151,8 @@ class NativeClient {
if (Platform.isIOS) {
_asyncCallbackLib = DynamicLibrary.executable();
} else {
// Necessary to load library for macOS to work
_wormholeWilliamLib = DynamicLibrary.open(libName("wormhole_william"));
_asyncCallbackLib = DynamicLibrary.open(libName("bindings"));
}

Expand Down
2 changes: 1 addition & 1 deletion macos/dart_wormhole_william.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Pod::Spec.new do |s|
s.version = '0.0.1'
s.summary = 'A new flutter plugin project.'
s.prepare_command = <<-CMD
mkdir build
mkdir -p build
cd build
cmake --trace ../
make
Expand Down

0 comments on commit ab25b07

Please sign in to comment.