-
-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Build Configuration Release Fails #10
Comments
|
I think you have to clean & rebuild. Open Xcode and hit "Clean Build Folder", then run those commands:
and finally build your app |
Tried all of that and have the same issues. |
Hmm, the compiler options for debug don't seem to have any important changes compared to the options for release except the |
Another idea: Open return jsi::String::createFromUtf8(runtime, value.UTF8String); replace that with: return convertNSStringToJSIString(runtime, value); see if that changes anything. |
Did not seem to change anything. I also tried many attempts at changing the compiler options to no avail. |
I have to test it more but changing the iOS Deployment Target to 11.0 seems to have resolved the issue. |
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) |
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! |
I've the same issue with RN 0.63.4 and react-native-mmkv 1.0.3
|
@ManAnRuck can you confirm that this issue only happens in Release builds? In Debug everything works fine? I have just published 1.0.4 on npm, try if that works for you (clean everything before upgrading) |
@mrousavy I can confirm, that it was happening only in Release build mode. Clearing project doesn't solved it. increase platform target from 10 to 11 solved it 👍🏼 For me, the platform target is totally fine. I like this package 😃 thank you |
|
Yes. It happens only on release build. Increasing platform target to 11 doesn't work for me. |
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 |
|
@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? |
I have the same issue , changing the platform target to 11 did not work with me react native version : 0.63.4 We were about to publish our app to App store , but after replacing the AsyncStorage with this library; we cannot build in IOS 🤦 |
@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. |
@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
|
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 IN XCODESelect pods from the menu on the left Click on linyue at the top and select Edit Scheme 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. |
@gavinmahan yes! i build success follow your steps! thanks a lot. but i am curious why this works? |
@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 |
Thanks @mrousavy |
Moving to target 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 ! |
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. |
Running into this same error but in my case it builds fine regardless of scheme on iOS but fails with the aforementioned |
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.
|
I get these four fatal errors when building in Release mode but everything works great in Debug mode.
/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:933:43: Use of undeclared identifier 'kindOf'
/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:933:43: No matching function for call to 'kindOf'
/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"
/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:939:26: Cannot allocate reference type 'signed char &' with new
The text was updated successfully, but these errors were encountered: