ammarahm-ed / react-native-mmkv-storage

An ultra fast (0.0002s read/write), small & encrypted mobile key-value storage framework for React Native written in C++ using JSI
https://rnmmkv.now.sh
MIT License
1.61k stars 113 forks source link

[Bug] New Arch support throwing error #368

Open mobinni opened 5 days ago

mobinni commented 5 days ago

Describe the bug When doing a clean install from scratch with a barebones RN project (non-expo) with new arch enabled the following errors pop up

Screenshot 2024-11-12 at 4 05 32 PM

I also had to disable this in the

//@implementation NativeMMKVStorageSpecBase
//
//
//- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
//{
//  _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
//}
//@end
Screenshot 2024-11-12 at 4 08 04 PM

To Reproduce Steps to reproduce the behavior:

  1. Create a new app
  2. Install 0.11.2
  3. Run ❯ RCT_NEW_ARCH_ENABLED=1 pod install
  4. Build app

Expected behavior MMKV bindings are installed

Screenshots If applicable, add screenshots to help explain your problem.

Platform Information:

efstathiosntonas commented 1 day ago

same here with slightly different error on react-native 0.76.2 and mmkv@0.11.2

xcode console logs:

'JSI bindings were not installed for: MMKVStorage', [TypeError: Cannot read property 'install' of null]
Error: MMKVStorage bindings not installed, js engine: hermes
libc++abi: terminating due to uncaught exception of type std::__1::bad_function_call: std::exception