-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
'value' is unavailable: introduced in iOS 12.0 #34106
Comments
Same issue here. I'm also using Xcode 12.4 - Could that be the reason? |
+1 |
My system: Xcode Version:12.4 (12D4e) The latest system cannot be upgraded,Could that be the reason? |
same issue, please give me solution when u have. tks |
Same with me |
+1 |
hope that works..... |
I have the same problem. I think the error is that the app runs iOS 14.4 |
Here's how I fixed it:
That's all. diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index 7f6ebab..cea0fef 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -398,7 +398,7 @@ def get_react_codegen_spec(options={})
'source' => { :git => '' },
'header_mappings_dir' => './',
'platforms' => {
- 'ios' => '11.0',
+ 'ios' => '12.0',
},
'source_files' => "**/*.{h,mm,cpp}",
'pod_target_xcconfig' => { "HEADER_SEARCH_PATHS" => |
this worked, on a brand new project. Ive yet to add packages to see if those run fine. but can you please explain your line of thinking/workflow that made you come to this solution? edit: after installing packages, project kept on reverting to 11.0. still unable to find a solution |
npx patch-package react-native |
+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. |
@craspadotcom You have to add the postinstall script in package.json so it patches the files when you install/update packages. "scripts": {
"postinstall": "patch-package",
}, 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. |
This fix worked for me |
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. |
this was helpful my issue was resolved using this |
Thanks for this. After so many tries on how to resolve this issue, this is the one that worked. 🍻 |
Update for version 0.70.3: diff --git a/node_modules/react-native/scripts/cocoapods/codegen_utils.rb b/node_modules/react-native/scripts/cocoapods/codegen_utils.rb
index 6fcbb15..7e457b9 100644
--- a/node_modules/react-native/scripts/cocoapods/codegen_utils.rb
+++ b/node_modules/react-native/scripts/cocoapods/codegen_utils.rb
@@ -84,7 +84,7 @@ class CodegenUtils
'source' => { :git => '' },
'header_mappings_dir' => './',
'platforms' => {
- 'ios' => '11.0',
+ 'ios' => '12.0',
},
'source_files' => "**/*.{h,mm,cpp}",
'pod_target_xcconfig' => { "HEADER_SEARCH_PATHS" => |
+1 |
I had the same issue. Advice from @sesm worked 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 :) |
@ammarahm-ed 's and @sesm 's solution helped me as well. Thank you! |
I think If you set like this in Podfile, you don't have to change them manually everytime.
|
Thank you so much. You saved my day. |
I fixed this by upgrading react-native from 0.71.4 to 0.71.11 |
This issue was fixed for me by bumping So if you're still on react-native 0.70.x, you can still get support for Xcode 14.3 using minor version 10. |
…sues. Check the issue here: facebook/react-native#34106 (comment)
I just remove pods folder under ios |
thanks this work for me |
Thank you, This worked for me |
This worked on my project: |
just upgrade react native version to 0.72.3 and pod install fix it for me |
The ios example for react native didn't run on xcode 13.4. Therefore we use this hack facebook/react-native#34106 (comment) This can probably be removed once the react native version is upgraded.
Today, what is the required version? ios12? or 16? |
@holicstudio depends on your RN version. For the current version, 0.72.4, it's 12.4: https://github.com/facebook/react-native/blob/v0.72.4/packages/react-native/scripts/react_native_pods.rb#L41 You shouldn't need to manually change the version in the Pods project settings with recent RN versions though, the template Also, you may have other dependencies that pull up this min required version (for example I believe Expo currently needs 13+ if you're using that in your RN project) |
How to configure only once since the project is updated :-? |
## Short description This PR updates react-native to resolve an error related to the new version of xcode. ref: facebook/react-native#34106 ## List of changes proposed in this pull request - Update package.json - Update pod ## How to test Run the example app. It should works correctly
I have an Apple Macbook Pro M3 with Xcode 15.3.
|
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(R) Core(TM) 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
The text was updated successfully, but these errors were encountered: