appandflow / appandflow/react-native-safe-area-context

Support use_frameworks!

Aperta
#416 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
help wanted New arch Platform: iOS
Lingua principale
TypeScript
Stelle
2.8k
Fork
258
Merge medio
3g 1h
PR unite (30g)
2

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.