-
Notifications
You must be signed in to change notification settings - Fork 56
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
IOS Release running error: Failed to lookup symbol #17
Comments
you need to include to solve this issue, there is a workaround this to force Xcode Link to your library. #[no_mangle]
pub extern "C" fn link_me_please() {} and then in your package/ios add a dommy method in your class that calls this function. note that your |
Right now, I did like this
It works well in ios debug mode, async function works well too. And I found a releated issue in another project. brickpop/flutter-rust-ffi#7
|
And I'm confused. There is no store_dart_post_cobject function in binding.h, how can it be called? And it work fine in IOS debug mode. |
the use allo_isolate::ffi;
#[no_mangle]
pub unsafe extern "C" fn store_dart_post_cobject(
ptr: ffi::DartPostCObjectFnType,
) {
allo_isolate::store_dart_post_cobject(ptr);
} |
Also worth mentioning this too: https://flutter.dev/docs/development/platform-integration/c-interop#ios-symbols-stripped |
After did like above. This time, I am trying to build and run flutterust project directly in IOS release mode.
|
Unfortunately, I don't have access to a macOS Machine right now to do tests and try to fix this issue, but feel free if you got it to work correctly to Open a PR for README to add steps to fix this issue. |
You can pull this project from me and it has been resolved. the reason: |
I found that even though this allows the build to succeed, this is not a fix. The POST_COBJECT is never stored correctly and is always None during post calls even after setup. |
When I compile and run in deubg mode on ios, everything works fine. But when I switch to release, I got the error like below:
The text was updated successfully, but these errors were encountered: