react-native: 'value' is unavailable: introduced in iOS 12.0
Description
‘value’ is unavailable: introduced in iOS 12.0
Version
0.69.0
Output of npx react-native info
System: OS: macOS 10.15.7 CPU: (4) x64 Intel® Core™ i7-3520M CPU @ 2.90GHz Memory: 27.26 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node Yarn: 1.22.10 - ~/.nvm/versions/node/v14.17.0/bin/yarn npm: 8.4.1 - ~/.nvm/versions/node/v14.17.0/bin/npm Watchman: 4.7.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: API Levels: 23, 25, 26, 27, 28, 29, 30 Build Tools: 26.0.2, 26.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.3 System Images: android-25 | Google APIs ARM EABI v7a, android-29 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7351085 Xcode: 12.4/12D4e - /usr/bin/xcodebuild Languages: Java: 1.8.0_152 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.0 => 0.69.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
npx react-native init example --template react-native-template-typescript
yarn start
open xcode run
Snack, code example, screenshot, or link to a repository
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 33
- Comments: 99 (4 by maintainers)
Commits related to this issue
- Updating RN after bug with XCode 13 https://github.com/facebook/react-native/issues/34106#issuecomment-1495970568 — committed to thirdweb-example/catattacknft-react-native by deleted user a year ago
- Update RN to 0.69.9 to fix issue with XCode 14.3: https://github.com/facebook/react-native/issues/34106#issuecomment-1495970568 Removed Coinbase Wallet as default wallet because of bug found in iOS ... — committed to thirdweb-example/react-native-typescript-starter by deleted user a year ago
- Updates RN to fix bug introduced with XCode 14.3: https://github.com/facebook/react-native/issues/34106#issuecomment-1495970568 Updates UI to match typescript starter — committed to thirdweb-example/react-native-expo-starter by deleted user a year ago
- Update CircleCI Xcode version to 14.3.0 (#598) - Update CircleCI Xcode version to 14.3.0 which will make tests run on iOS 16. - Update React Native to 0.71.6 to fix [a compilation issue](https://g... — committed to RevenueCat/react-native-purchases by MarkVillacampa a year ago
- Fix a known Xcode issue (#25) Change IPHONEOS_DEPLOYMENT_TARGET to 12.4 to fix https://github.com/facebook/react-native/issues/34106. This issue happens after upgrading to Xcode 14.3. Co-authore... — committed to coinbase/waas-sdk-react-native by hyang74 a year ago
- Update CircleCI Xcode version to 14.3.0 (#598) - Update CircleCI Xcode version to 14.3.0 which will make tests run on iOS 16. - Update React Native to 0.71.6 to fix [a compilation issue](https://g... — committed to RevenueCat/react-native-purchases by MarkVillacampa a year ago
- Update CircleCI Xcode version to 14.3.0 (#598) - Update CircleCI Xcode version to 14.3.0 which will make tests run on iOS 16. - Update React Native to 0.71.6 to fix [a compilation issue](https://g... — committed to RevenueCat/react-native-purchases by MarkVillacampa a year ago
- update(package.json):: react-native 0.70.5 to 0.70.10 to fix build issues. Check the issue here: https://github.com/facebook/react-native/issues/34106#issuecomment-1601242383 — committed to sportakal/swiftui-react-native-example by sportakal a year ago
- update react native example to ios 12.4 The ios example for react native didn't run on xcode 13.4. Therefore we use this hack https://github.com/facebook/react-native/issues/34106#issuecomment-141768... — committed to breez/breez-sdk by JssDWt a year ago
- example: fix building on latest Xcode https://github.com/facebook/react-native/issues/34106 — committed to fusetools/react-native-unity2 by mortend a year ago
- [SIW-755] Update `react-native` to version `0.70.14` (#27) ## Short description This PR updates react-native to resolve an error related to the new version of xcode. ref: https://github.com/facebo... — committed to pagopa/io-react-native-crypto by hevelius 7 months ago
In iOS Folder go to Pods/Pods.xcodeproj/xcuserdata/project.pbxproj
Change all the ‘IPHONEOS_DEPLOYMENT_TARGET = 11.0’ to ‘IPHONEOS_DEPLOYMENT_TARGET = 12.4’. save and run.
Note: every time you pod install it will change so again you have to do it. If there is better approach please do mention.
Here’s how I fixed it:
node_modules/react-native/scripts/react_native_pods.rb
'ios' => '11.0',
11.0
to12.0
patch-package
to make a patch.ios/build/generated/ios/React-Codegen.podspec.json
and confirm"platforms": { "ios": "12.0" }
That’s all.
@OmarUsman777
I think If you set like this in Podfile, you don’t have to change them manually everytime.
Can confirm this happens in Xcode 14.3. I downloaded RC2 today and this issue started. I was able to solve it by the following:
Pods
.React-Codegen
and set the window toBuild Settings
.iOS Deployment Target
to12.4
.Update for version 0.70.3: If you want to follow advice from @ammarahm-ed , the property is in a different file now:
The second solution is:
But you should do this every time when project is updates
👋 everyone!
We have just finished rolling out new patch releases for the versions in the release support window to address this problem, check them out:
They should address this problem fully.
https://stackoverflow.com/a/75915794/12105742
This solution works for me
This simple solution worked for me
Hey folks, just an headsup: we already landed the change that fixes this correctly in https://github.com/facebook/react-native/pull/36759 and we are about to release the supported versions of React Native with their right fixes:
Expect them to land later this week.
npx patch-package react-native
This solution worked for me with Xcode 14.3RC
https://stackoverflow.com/a/74487309
I fixed this by upgrading react-native from 0.71.4 to 0.71.11
This worked for me, after
npm install
,bundle install
andpod install
. Thanks kelset!You’ve saved my life. Hours upon hours of trying to fix it, and this did the trick.
This worked like magic.
this was helpful my issue was resolved using this
if anybody with with react native 0.70 still facing this issue please upgrade to latest react native version 1.npx react-native upgrade 2. cd ios 3. pod install 4. Reopen xcode and build
Yup. Upgrading from 0.71.4 to 0.71.6 fixes this issue.
This is happening with Xcode Cloud when you have Xcode set to 14.3RC, if you change it to 14.2 you are good to go.
I wonder if this is due to changes in Swift 5.8.
Same issue here. I’m also using Xcode 12.4 - Could that be the reason?
This almost worked for me. I also had to update the build targets for
react-native-quick-crypto
andreact-native-quick-base64
. So if anyone relies on these dependencies as well, those need to be bumped.@craspadotcom You have to add the postinstall script in package.json so it patches the files when you install/update packages.
The error occurs because React Native 0.69 targets ios 12.4 in Podfile but the Codegen generated podspec still targets ios 11.0 while using ios 12+ apis. I think there should be a patch release that fixes this issue.
Just had this issue and applying the change to all the pods didn’t cut it for me. So instead that’s what worked for me.
Here’s an expo config plugin that worked for me for managed Expo workflow (it updates the deployment target for all pods to 13.0)
Put this in “<project_root>/config-plugins/deployment-targets.js”
Then add to your
app.json
:Then
rm -rf ios
=>expo run:ios
change the pod files line number 31-37 as (comment this line) use_flipper!()
post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer)
sed -i -e $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h
endsearch IPHONEOS_DEPLOYMENT_TARGET in the whole project and change to 12.4 for every pod as well
hope that works…
This issue was fixed for me by bumping
react-native
from0.70.6
to0.70.10
, in order to get this fix: https://github.com/facebook/react-native/commit/c5e549e694607cd576be8fcb5ed909fec2ed6dceSo if you’re still on react-native 0.70.x, you can still get support for Xcode 14.3 using minor version 10.
It still happens with XCode 14.3.1 and RN 0.71.8 on several modules like : react-native-simple-toast, react-native-svg, react-native-permissions…
The problem started to pop in my project after updating XCode from 14.1 to 14.3.1.
@WyrdRaven did you remember to
pod install
after the upgrade? The fix needs to change a setting in the Pods xcodeproj file.@iway1 This works for me, updating all the pods isn’t necessary
Here is edit for only patching
React-Codegen
At least temporarily, I recommend this solution if using expo, manually editing the podfile isn’t optimal in the expo workflowThank you, it works perfectly for me.
This is happening to me on XCode 14.2 as well since 2 days ago
https://mrdevgeek.com/xcode-14-3-simulator-16-4-build-failure-how-to-fix-value-is-unavailable-introduced-in-ios-12-0-error-with-react-native-0-71-5/
work for me
You saved my job man! I know this is because our old macs are not updating to the latest ios. Now i hope i earn enough to buy the new mac 😃
Thanks for this. After so many tries on how to resolve this issue, this is the one that worked. 🍻
just upgrade react native version to 0.72.3 and pod install fix it for me
@efecantekin try cleaning the build using CMD/CRTL+SHIFT+K on xcode and try add the pods again
npx pod-install
- this worked for meGuys, don’t do anything fancy, just update to the latest minor version, delete pods, Podfile.lock, reinstall the pods with pod install --repo-update, and everything should work. See
@kouhot 's solution worked for me. Had to add this to Podfile and then Clean and run pod install again, and everything worked without error. Thanks kouhot!
thank you, it worked for me
Unfortunately this only fixed things for me for the React Native stuff. I guess I’ll have to make an issue on Quick Crypto to get them to fix the same issue.
Thank you so much. You saved my day.
I have an Apple Macbook Pro M3 with Xcode 15.3. If anyone out there is unable to solve it, try this version: The
IPHONEOS_DEPLOYMENT_TARGET
should be13.0
. It should be more than12.4
.in “react-native”: “0.71.2”
npx patch-package react-native
this works! try this
I found that the scalpel is better than the hammer. This is in
ios/Podfile
.thanks everyone! Sounds like for RN the issue is addressed, if you have similar issues but in separate libraries please open issues and PRs to them directly!
downgrading to xcode 14.2 also working.
This worked on my project: “react”: “18.1.0”, “react-native”: “0.70.6”, XCode Version 14.3 MacBookAir M1 - MacOS Ventura 13.0
I tried to build RN 71.10 on XCode 14.3.1 and got this error again. I checked Codegen_utils.rb and it uses min_ios_version_supported definition which returns 12.4 already in react_native_pods.rb.
isn’t this solved already, i am facing the same issue?
When i i have try this soultion then i am getting this error lol now do i fixed this issues i think your solution does’t work for me it is creating another problem, i guess everyone getting the same issues after trying your solutions like this i am totally fed -up with your solution pls someone suggest me another solution accepting this one
Thank’s, it worked
The same issue happened to me in new Xcode 14.3. That’s save me! Thanks! ❤️
This work for me
To anyone that keeps having these issues and is using XcodeCloud, make sure to go to the workflow settings and choose the correct environment. In my case it was using the latest environment (14.3RC at the moment) and that was breaking everything. I selected spewcifically 14.2 and multiple things got fixed.
+1
I’m getting this on a brand RN new project following the Getting Started instructions. Seems pretty ridiculous we’d have to modify one of the node_module files.
+1