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.22k stars 290 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 hour ago

mitissen commented 2 hours 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 2 hours ago

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

fzyzcjy commented 1 hour ago

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

mitissen commented 1 hour ago

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

fzyzcjy commented 1 hour ago

You are welcome and happy to see it works!