Error in UIStackView.h "Use of undeclared identifier 'FLT_MAX'"

In Xcode 15 and 14, I encounter the following error related to float max and min. This occurs within a React Native project, although it seems that React itself is not the cause of the error.

Replies

If you create a new project from one of the built-in templates, like iOS > App, does it have the same problem?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Nope, my other projects and freshly created one is working fine

Add a Comment

If anyone is experiencing the same issue, I found that adding header search paths in the podfile can lead to this problem. I had the following code in podfile to fix the 'react/debug/react_native_assert.h' file not found error. However, after removing it and implementing a different workaround, the error 'Use of undeclared identifier 'FLT_MAX'' disappeared.

    # Add the additional search path
    target.build_configurations.each do |config|
      config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../node_modules/react-native/ReactCommon/**"
    end