Tencent / MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
Other
17.28k stars 1.9k forks source link

Can't run on IOS in flutter, please help, thanks. #625

Closed bladeofgod closed 3 years ago

bladeofgod commented 3 years ago

The language of MMKV

dart

The version of MMKV

v1.2.8

The platform of MMKV

IOS (flutter)

The installation of MMKV

e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone

What's the issue?

My project struct is : base-frame code and pages code. (base-frame as a plugin in project).

I added the MMKV at base-frame, and insert some code in pod file based on the mmkv doc, but still cause an error when i run(whole project) on ios , log like below this.

Post the outputs or screenshots for errors.

/Users/dika/Documents/RiKiFlutter/riki2.0/ios/Runner/GeneratedPluginRegistrant.m:166:1: error: use of '@import' when modules are disabled @import mmkv; ^ /Users/dika/Documents/RiKiFlutter/riki2.0/ios/Runner/GeneratedPluginRegistrant.m:300:4: error: use of undeclared identifier 'MMKVPlugin' [MMKVPlugin registerWithRegistrar:[registry registrarForPlugin:@"MMKVPlugin"]];

lingol commented 3 years ago

Please read the wiki carefully. https://github.com/Tencent/MMKV/wiki/flutter_setup#ios

584