Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[F] set static_framework to true would link the pod target statically… #49

Merged

Conversation

zhileichen
Copy link
Contributor

@zhileichen zhileichen commented Mar 24, 2021

Fixed the error occurs when build macos app with release:

#0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:31)
#1      bitsdojoWindowAPI (package:bitsdojo_window_macos/src/native_api.dart:198)
#2      _publicAPI (package:bitsdojo_window_macos/src/native_api.dart)
#3      _setWindowCanBeShown (package:bitsdojo_window_macos/src/native_api.dart)
#4      setWindowCanBeShown (package:bitsdojo_window_macos/src/native_api.dart)
#5      BitsdojoWindowMacOS.doWhenWindowReady.<anonymous closure> (package:bitsdojo_window_macos/src/bitsdojo_window_macos_real.dart:14)

'Cause set static_framework to true would link the pod target statically to the parent target, which would not generate a bitsdojo_window_macos.framework, the framework should be dynamically loaded by dart ffi

… to the parent target, which would not generate a bitsdojo_window_macos.framework, the framework was called by dart ffi
@bitsdojo
Copy link
Owner

Hi there,

You mentioned:

the framework should be dynamically loaded by dart ffi

Could you please provide more details on this? Is there a reason why the framework should be dynamically loaded?

@bitsdojo
Copy link
Owner

You mentioned this error:

#0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:31)
#1      bitsdojoWindowAPI (package:bitsdojo_window_macos/src/native_api.dart:198)
#2      _publicAPI (package:bitsdojo_window_macos/src/native_api.dart)
#3      _setWindowCanBeShown (package:bitsdojo_window_macos/src/native_api.dart)
#4      setWindowCanBeShown (package:bitsdojo_window_macos/src/native_api.dart)
#5      BitsdojoWindowMacOS.doWhenWindowReady.<anonymous closure> (package:bitsdojo_window_macos/src/bitsdojo_window_macos_real.dart:14)

Just tried building the app in release mode on my computer and didn’t get any error.
What are the steps you follow when getting this error?

@zhileichen
Copy link
Contributor Author

zhileichen commented Mar 25, 2021

Hello,

To reproduce this error, you should build your example app with Xcode Archive and export the app, then run the exported app and check the logs.
I have reproduced the error using the example.

@bitsdojo bitsdojo merged commit ae778e2 into bitsdojo:master Mar 25, 2021
@bitsdojo
Copy link
Owner

Got it. Just confirmed it on my machine.

Good catch. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants