question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sematic Issue Xcode 13

See original GitHub issue

Please 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.

  1. npx react-native init myproject
  2. 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:open
  • Created 2 years ago
  • Reactions:8
  • Comments:9

github_iconTop GitHub Comments

5reactions
cuttlascommented, Oct 22, 2021

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 command sed -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:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'myApp' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => true
  ) 

  target 'myAppTests' do
    inherit! :complete
  end

  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_14_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h`
  end
end

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.

2reactions
mezodcommented, Oct 22, 2021

I can confirm it’s also happening with: xcode 13.0 macOS 11.5.2 RN 0.66 node 15.9.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

suggestions on how i can resolve this "Semantic Issue" error
There is a "Convert to Objective-C ARC" menu item in the Edit -> Refactor menu of Xcode. But before doing this you should...
Read more >
Semantic issue after installing Xcode utilities - Apple Developer
Hello, I'm maintaining a legacy application in Objective-C which used to compile finely. Last week Xcode aked for installing some utilities and the...
Read more >
iOS build don't work, semantic issue - LÖVE
Semantic Issue Group /Applications/Xcode.app/Contents/Developer/ ... /Downloads/love-11.3-ios-source/src/libraries/glad/glad.cpp:13:10: In ...
Read more >
ARC Semantic Issue: No visible @interface for Class declares ...
iOS : ARC Semantic Issue : No visible @interface for Class declares the selector [ Beautify Your Computer ...
Read more >
macOS Big Sur Xcode Compile Semantic Fail Errors | Forum
My issue is I'm using a Macbook Pro M1, macOS Big Sur. Xcode 10.3 can not be used with macOS Big Sur. So,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found