fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
4.29k stars 301 forks source link

The method 'initMockImpl' isn't defined for the class 'RustLib' after Upgrade from 2.1.0 to 2.5.0 #2362

Closed mitissen closed 1 month ago

mitissen commented 1 month ago

Hello, i'am upgraded with

cargo install flutter_rust_bridge_codegen && flutter_rust_bridge_codegen generate

from Version 2.1.0 to 2.5.0

and suddenly getting:

Failed to build iOS app
Error (Xcode): modules/my_flutter_rust_lib/lib/src/rust/frb_generated.dart:39:14: Error: The method 'initMockImpl' isn't defined for the class 'RustLib'.

I checked the generated code and everything looks fine. The 'initMockImpl' exists also

Do i need to clean something in the ios Project? (Tried delete and recreate pods)

welcome[bot] commented 1 month ago

Hi! Thanks for opening your first issue here! :smile:

fzyzcjy commented 1 month ago

Hmm could you please firstly flutter pub get to upgrade your dependencies and see whether it works

mitissen commented 1 month ago

Now it works!   Thank you @fzyzcjy for your wonderful library and your quick help!

fzyzcjy commented 1 month ago

You are welcome and happy to see it works!

github-actions[bot] commented 2 weeks ago

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.