-
Notifications
You must be signed in to change notification settings - Fork 301
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
The bridge always wants to load a framework on iOS #1772
Comments
Hi! Thanks for opening your first issue here! 😄 |
Hi, one way is to customize how the library is loaded: https://cjycode.com/flutter_rust_bridge/guides/how-to/load-library Another way is to use
Yes, this is guaranteed by running it on CI (all platforms are auto checked, as well as many other checks) ;) |
@fzyzcjy Thank you for your advice! However after I choose to load the library from the process, the bridge complains cannot find P.S. I now generate the header with |
Or, where should I change the link args to make the linker always link the static lib so that I don't need the dummy method to enforce bundling? |
Ok this seems to be a bug, because dummy_method_to_enforce_bundling is not used in the cargokit-based approach so I missed it - feel free to PR (looks like a Line 25 in cfd8862
func_names + EXTRA_EXTERN_FUNC_NAMES .
Before fixing it, maybe firstly try to manually add that few functions, and see whether it works. EDIT: Seems that it is already generated https://github.com/fzyzcjy/flutter_rust_bridge/blob/cfd88621f77de211a9c214508b2dfcca29efd4e7/frb_example/pure_dart/frb_generated.h#L16432 Btw, if your library does not customize the build process, then directly using |
The declaration is not generated:) I mean the signature And by the way it seems that the other 3 methods are no longer needed. |
Oh looks reasonable! P.S. Its declaration can be copied from flutter_rust_bridge/frb_dart/lib/src/ffigen_generated/intermediate/allo_isolate.h Line 61 in cfd8862
|
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue. |
Describe the bug
I'm trying to upgrade a frbv1 project to frbv2. The upgrade is successful on Android, but not iOS. With frbv1, the native lib is built as staticlib with a project generated by cargo-xcode. However, after upgrading to frbv2, the dart side always wants to load
native.framework/native
. I looked through the examples in this repo, but they all use cargokit. Is there a smooth upgrade path to still use the static lib without framework, or a way to change the xcode project to generate a dummy framework?Steps to reproduce
The instructions here is interesting. Does
dart_minimal
really run well on iOS?Logs
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of
flutter_rust_bridge_codegen
No response
Flutter info
No response
Version of
clang++
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: