Kureev / react-native-blur

React Native Blur component
MIT License
3.76k stars 556 forks source link

The build fail on iOS in react-native 0.73.2 with Fabric enabled #606

Open Pnlvfx opened 8 months ago

Pnlvfx commented 8 months ago

BUILD FAILED

The following build commands failed: CompileC /Users/simo97/Library/Developer/Xcode/DerivedData/baby_music-giujgitoxilyejamwsanzkibqfzo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/react-native-blur.build/Objects-normal/arm64/VibrancyViewManager.o /Users/simo97/Desktop/baby_music/node_modules/@react-native-community/blur/ios/VibrancyViewManager.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'react-native-blur' from project 'Pods') CompileC /Users/simo97/Library/Developer/Xcode/DerivedData/baby_music-giujgitoxilyejamwsanzkibqfzo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/react-native-blur.build/Objects-normal/arm64/VibrancyView.o /Users/simo97/Desktop/baby_music/node_modules/@react-native-community/blur/ios/VibrancyView.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'react-native-blur' from project 'Pods') CompileC /Users/simo97/Library/Developer/Xcode/DerivedData/baby_music-giujgitoxilyejamwsanzkibqfzo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/react-native-blur.build/Objects-normal/arm64/BlurViewManager.o /Users/simo97/Desktop/baby_music/node_modules/@react-native-community/blur/ios/BlurViewManager.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'react-native-blur' from project 'Pods') CompileC /Users/simo97/Library/Developer/Xcode/DerivedData/baby_music-giujgitoxilyejamwsanzkibqfzo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/react-native-blur.build/Objects-normal/arm64/BlurView.o /Users/simo97/Desktop/baby_music/node_modules/@react-native-community/blur/ios/BlurView.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'react-native-blur' from project 'Pods') (4 failures)

System: OS: macOS 14.2.1 CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz Memory: 571.42 MB / 8.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 21.5.0 path: /usr/local/bin/node Yarn: version: 1.22.19 path: ~/.yarn/bin/yarn npm: version: 10.2.4 path: /usr/local/bin/npm Watchman: version: 2023.12.04.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

isinuyk commented 8 months ago

Got the same problem on RN 0.73.2 Fabric enabled

Was able to temporary fix it by adding this script into post install script of Podfile

    installer.pods_project.targets.each do |target|
      if target.name === "react-native-blur"
        append_header_search_path(target, "${PODS_ROOT}/Headers/Private/Yoga")
      end
    end

and also define this append_header function at the top of Podfile

def append_header_search_path(target, path)
  target.build_configurations.each do |config|
      # Note that there's a space character after `$(inherited)`.
      config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
      config.build_settings["HEADER_SEARCH_PATHS"] << path
  end
end
longnguyen2508 commented 8 months ago

Got the same issue while enabled New Architecture on 0.73.3

In Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/core/PropsParserContext.h

'react/utils/ContextContainer.h' file not found