Comments (28)
@mrousavy I can confirm, that it was happening only in Release build mode.
Clearing project doesn't solved it.
An upgrade to 0.64.0-rc.3 doesn't solved it.
react-native-mmkv 1.0.4 doesn't solved it.
increase platform target from 10 to 11 solved it ππΌ
(with both react-native-mmkv versions also with rn 0.63 & 0.64)
For me, the platform target is totally fine. I like this package π thank you
from react-native-mmkv.
@mrousavy here is a fresh new project with only react-native-mmkv installed, rn v0.64.0.rc.4 https://github.com/KingAmo/test-react-native-mmkv , I can not archive success using XCode
***/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:934:43: Use of undeclared identifier 'kindOf'
Since I started this issue I figured I'd give your app a try. Changing the iOS Deployment Target to 11 seems to work for your app:
From a fresh download of your app:
npm install
cd ios && pod install && cd ..
open ios/linyue.xcworkspace
IN XCODE
Select pods from the menu on the left
In the targets drop down select react-native-mmkv
Select Build Settings
Change the iOS Deployment Target to 11
Click on linyue at the top and select Edit Scheme
Change Build Configuration to Release
Press the Build & Run button and wait.
Seems like if I do pod install again I have to set the iOS Deployment Target to 11 again.
from react-native-mmkv.
@gavinmahan you're a legend.
@KingAmo @frodoe7 I have just published 1.0.6 to npm which specifies iOS 11 in the podspec, let's see if that works for you
from react-native-mmkv.
Thanks @mrousavy
it solved now in this version 1.0.6 π
from react-native-mmkv.
I have to test it more but changing the iOS Deployment Target to 11.0 seems to have resolved the issue.
from react-native-mmkv.
I cannot reproduce this issue, just tried to delete all cache and clean build folder to rebuild in Release mode, and everything works fine on my end (RN 0.64).
What RN version are you on?
Make sure you installed the latest version of react-native-mmkv (1.0.3)
from react-native-mmkv.
Could just have been my set up. I tried it with a brand new app app installed yesterday so I assume it was the latest version of react. Who knows, itβs working perfectly now, thanks!
from react-native-mmkv.
@mrousavy here is a fresh new project with only react-native-mmkv installed, rn v0.64.0.rc.4 https://github.com/KingAmo/test-react-native-mmkv , I can not archive success using XCode
***/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:934:43: Use of undeclared identifier 'kindOf'
...
from react-native-mmkv.
@gavinmahan yes! i build success follow your steps! thanks a lot. but i am curious why this works?
from react-native-mmkv.
@mrousavy here is a fresh new project with only react-native-mmkv installed, rn v0.64.0.rc.4 https://github.com/KingAmo/test-react-native-mmkv , I can not archive success using XCode
***/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:934:43: Use of undeclared identifier 'kindOf'
Since I started this issue I figured I'd give your app a try. Changing the iOS Deployment Target to 11 seems to work for your app:
From a fresh download of your app:
npm install
cd ios && pod install && cd ..
open ios/linyue.xcworkspaceIN XCODE
Select pods from the menu on the left
In the targets drop down select react-native-mmkv
Select Build Settings
Change the iOS Deployment Target to 11Click on linyue at the top and select Edit Scheme
Change Build Configuration to ReleasePress the Build & Run button and wait.
Seems like if I do pod install again I have to set the iOS Deployment Target to 11 again.
That did the trick for me. Thank you. For the others, just make sure to change the deployment target to the Pod and not to the whole app like I was doing first.
from react-native-mmkv.
react-native-mmkv
v1.0.0 is ok. v1.0.1 && v1.0.2 has this error
from react-native-mmkv.
I think you have to clean & rebuild. Open Xcode and hit "Clean Build Folder", then run those commands:
rm -rf node_modules/react-native-mmkv
rm -rf package-lock.json
rm -rf ios/Pods
rm -rf ios/Podfile.lock
npm i
cd ios
pod install
and finally build your app
from react-native-mmkv.
Tried all of that and have the same issues.
from react-native-mmkv.
Hmm, the compiler options for debug don't seem to have any important changes compared to the options for release except the GCC_PREPROCESSOR_DEFINITIONS = $(inherited)
π€π€
Could you maybe try playing around with those values? The file you're searching for is in node_modules/react-native-mmkv/ios/Mmkv.xcodeproj/project.pbxproj
- after every change you have to pod install
from react-native-mmkv.
Another idea: Open Mmkv.mm
in Xcode, go to line 72
return jsi::String::createFromUtf8(runtime, value.UTF8String);
replace that with:
return convertNSStringToJSIString(runtime, value);
see if that changes anything.
from react-native-mmkv.
Did not seem to change anything. I also tried many attempts at changing the compiler options to no avail.
from react-native-mmkv.
I've the same issue with RN 0.63.4 and react-native-mmkv 1.0.3
react-native-mmkv Group
Semantic Issue Group
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:933:43: Use of undeclared identifier 'kindOf'
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:57:16: In instantiation of function template specialization 'facebook::jsi::Value::Value<signed char &>' requested here
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:1146:30: Must qualify identifier to find this declaration in dependent base class
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:1149:30: Must qualify identifier to find this declaration in dependent base class
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:1152:30: Must qualify identifier to find this declaration in dependent base class
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:933:43: No matching function for call to 'kindOf'
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:1146:30: Candidate function not viable: no known conversion from 'signed char' to 'const facebook::jsi::Symbol' for 1st argument
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:1149:30: Candidate function not viable: no known conversion from 'signed char' to 'const facebook::jsi::String' for 1st argument
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:1152:30: Candidate function not viable: no known conversion from 'signed char' to 'const facebook::jsi::Object' for 1st argument
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:934:5: Static_assert failed due to requirement 'std::is_base_of<facebook::jsi::Symbol, signed char &>::value || std::is_base_of<facebook::jsi::String, signed char &>::value || std::is_base_of<facebook::jsi::Object, signed char &>::value' "Value cannot be implicitly move-constructed from this type"
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:
/MY_LOCAL_PATH/App/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:939:26: Cannot allocate reference type 'signed char &' with new
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/Mmkv.mm:2:
/MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:9: In file included from /MY_LOCAL_PATH/App/node_modules/react-native-mmkv/ios/YeetJSIUtils.h:10:
from react-native-mmkv.
@ManAnRuck can you confirm that this issue only happens in Release builds? In Debug everything works fine?
Did you try removing all cache (node_modules, Pods, lockfiles and Build Output Folder) and completely rebuilding?
I have just published 1.0.4 on npm, try if that works for you (clean everything before upgrading)
from react-native-mmkv.
increase platform target from 10 to 11
do not solve the problem in my case...
from react-native-mmkv.
@ManAnRuck can you confirm that this issue only happens in Release builds? In Debug everything works fine?
Did you try removing all cache (node_modules, Pods, lockfiles and Build Output Folder) and completely rebuilding?I have just published 1.0.4 on npm, try if that works for you (clean everything before upgrading)
Yes. It happens only on release build. Increasing platform target to 11 doesn't work for me.
from react-native-mmkv.
- Have you tried the latest version (1.0.5)?
- What react-native version are you on?
- Have you tried to clean cache & rebuild?:
Clean Xcode caches:
cd ios
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
Clean local package caches:
rm -rf node_modules
rm -rf package-lock.json
rm -rf ios/Pods
rm -rf ios/Podfile.lock
npm i # or yarn
cd ios
pod repo update && pod update && pod install
from react-native-mmkv.
- Have you tried the latest version (1.0.5)?
- What react-native version are you on?
- Have you tried to clean cache & rebuild?:
Clean Xcode caches:
cd ios killall Xcode xcrun -k xcodebuild -alltargets clean rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" rm -rf ~/Library/Developer/Xcode/DerivedData/* rm -rf ~/Library/Caches/com.apple.dt.Xcode/*Clean local package caches:
rm -rf node_modules rm -rf package-lock.json rm -rf ios/Pods rm -rf ios/Podfile.lock npm i # or yarn cd ios pod repo update && pod update && pod install
- Yes, I install the last version (1.0.5)
- I'm using react native 0.63.0
- I cleaned cache and rebuild according to your instruction but nothing changed at all.
from react-native-mmkv.
@alinavaie I'm using RN 0.64 and don't have any issues at all. Does it work if you create a new RN 0.63 project with only the react-native-mmkv lib installed?
from react-native-mmkv.
increase platform target from 10 to 11
do not solve the problem in my case...
I have the same issue , changing the platform target to 11 did not work with me
react native version : 0.63.4
react native mmkv version : 1.0.5
We were about to publish our app to App store , but after replacing the AsyncStorage with this library; we cannot build in IOS π€¦
from react-native-mmkv.
@frodoe7 again, I cannot reproduce. If you provide me a minimal reproduction (e.g. github repo, only with react-native-mmkv installed) I can help you.
from react-native-mmkv.
Moving to target 11.0
did the trick ! π
One question about this as I am quite new to the community πΆ , shouldn't this be defined here directly to prevent future crash ?
Thank you !
from react-native-mmkv.
Running into this same error but in my case it builds fine regardless of scheme on iOS but fails with the aforementioned Use of undeclared identifier 'kindOf'
when building for macOS using catalyst. So far changing deployment targets hasn't had any effect.
from react-native-mmkv.
I'm trying to add macos target to this library and use it with https://github.com/microsoft/react-native-macos. And I got this error. I'm happy to share I found the problem place and solution. I'll do PR with macos target later, meanwhile solution if somebody will need it.
diff --git a/node_modules/react-native-mmkv/ios/MmkvHostObject.mm b/node_modules/react-native-mmkv/ios/MmkvHostObject.mm
@@ -73,7 +85,7 @@
if (!arguments[0].isString()) throw jsi::JSError(runtime, "First argument ('key') has to be of type string!");
auto keyName = convertJSIStringToNSString(runtime, arguments[0].getString(runtime));
- auto value = [instance getBoolForKey:keyName];
+ bool value = [instance getBoolForKey:keyName];
return jsi::Value(value);
});
}
from react-native-mmkv.
Related Issues (20)
- detox throws error when metro is run with mocks HOT 2
- mmkvκ΄λ ¨ λ‘κ·Έ λ°μ ν΄κ²°
- iOS crash: malloc: *** error for object 0x282611260: pointer being freed was not allocated EXC_CRASH (SIGABRT)
- Crash reports after switching to use AppGroups due to 0xdead10cc HOT 2
- Cannot run in react-native 0.73.x HOT 1
- use expo go ,start with this error: CommandError: No development build (com.anonymous.***) for this project is installed. Please make and install a development build on the device first. HOT 3
- Unable to resolve module ./createMMKV.mock HOT 1
- Apple Privacy Manifest HOT 6
- Unable to make react-native-mmkv work with firebase auth persistence HOT 2
- duplicate symbols when used with react-native-quick-crypto HOT 1
- Storage breaks when calling storage.clearStore() on empty storage HOT 1
- `getString` fails on reload after calling `delete` with `encyptionKey` set in config HOT 7
- Crashing on bundle reload in beta version HOT 1
- Bug on RN 0.74 HOT 10
- How to Implement iCloud Sync to Keep Reinstalled Apps to Recover DataοΌ
- Building for 'iOS-simulator', but linking in dylib (/opt/local/lib/libz.1.3.1.dylib) built for 'macOS' HOT 2
- After defining the path for the MMKV instance, an empty 'MMKV' directory is still generated under $(Documents) HOT 3
- Expo managment. HOT 3
- Storage data not updating to next scene HOT 2
- Beta 5 Android build error cannot find symbol HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-mmkv.