Skip to content

Support use_frameworks! #416

Open
Open
@jankosecki

Description

@jankosecki

Hi,

we are using RN 0.72 with new architecture and we've tried to use use_frameworks! :linkage => static to upgrade our dependency of Firebase. However after doing that compilation of react-native-safe-area-context fails due to missing header files.

I'm trying to fix the issues by modifying spec via Podfile:

      if target.name == "react-native-safe-area-context" then
        target.build_configurations.each do |config|
          header_search = {"HEADER_SEARCH_PATHS" => [
            "$(PODS_TARGET_SRCROOT)/common/cpp/",
            "$(PODS_ROOT)/Headers/Public/hermes-engine/",
            "$(PODS_ROOT)/Headers/Public/RCTRequired/",
            "$(PODS_ROOT)/Headers/Public/FBLazyVector/",
            "$(PODS_ROOT)/Headers/Public/React-callinvoker/",
            "$(PODS_ROOT)/RCT-Folly/",
            "$(PODS_ROOT)/boost/",
            "$(PODS_ROOT)/DoubleConversion/",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers/",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers",
            "$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios/",
            "$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core",
          ]}
          config.build_settings.merge!(header_search)
        end
      end

but I wonder if there is a better way to support static frameworks than this

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions