Sematic Issue Xcode 13
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html
Created a fresh new project using npx react-native init myproject
and opened the myproject.xcworkspace
in Xcode 13. While Swift Conversion to Swift 5 I get Semantic Issue in RCT-Folly as follow: Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')
inside Time.h file
React Native version:
Run react-native info
in your terminal and copy the results here.
System: OS: macOS 12.0 CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz Memory: 45.39 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 15.14.0 - ~/.nvm/versions/node/v15.14.0/bin/node Yarn: 1.23.0-20200928.1349 - ~/.yarn/bin/yarn npm: 7.7.6 - ~/.nvm/versions/node/v15.14.0/bin/npm Watchman: 2021.06.07.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3 Android NDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.0/13A233 - /usr/bin/xcodebuild Languages: Java: 15.0.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.0 => 0.66.0 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- npx react-native init myproject
- open myproject.xcworkspace in Xcode 13 and start the conversion to Swift 5
Expected Results
Describe what you expected to happen.
Convert the project
Snack, code example, screenshot, or link to a repository:
Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:9
Top GitHub Comments
Ok, so I managed to fix it.
It turns out the M1 post-install workaround doesn’t work for me. Digging into the
__apply_Xcode_12_5_M1_post_install_workaround(installer)
method, I saw that it runs the commandsed -i -e $'s/__IPHONE_10_0/__IPHONE_12_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h
.For some unknown reason, my __IPHONE_OS_VERSION_MIN_REQUIRED macro is bigger than 12 even though the deployment target of my project and all the Pods is 11. So changing the above command to
sed -i -e $'s/__IPHONE_10_0/__IPHONE_14_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h
made the error go away.Now my Podfile looks like this:
I still don’t know why my __IPHONE_OS_VERSION_MIN_REQUIRED is not 11. Does anybody know why XCode may not be using the deployment target of my project? I’m also not sure if the change I made in the workaround may cause additional problems.
I can confirm it’s also happening with: xcode 13.0 macOS 11.5.2 RN 0.66 node 15.9.0