Create BaseViewProps for platforms to derive (#38549)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38549

Out of tree platforms may need different implementations of ViewProps. In fact, Android does already with props like `needsOffscreenAlphaCompositing` and `focusable`. This diff is not opinionated on whether these props should actually be shared on all platforms. Props like `focusable` may be a good candidate for generalizing to all platforms. However, there will always be a need for one platform to experiment with a new prop while it's not available yet on another, especially when considering out of tree platforms.

This diff moves the existing ViewProps class to BaseViewProps, aliases ViewProps as BaseViewProps for iOS for now, and moves Android-specific view props to it's own header and implementation.

## Changelog:
[General] [Added] - Support additional View props in out of tree platform Fabric implementations

Reviewed By: christophpurrer

Differential Revision: D47492635

fbshipit-source-id: 5739174a2b1d28ba84f4398ccc1cc0b846ebea79
This commit is contained in:
Eric Rozell
2023-07-31 11:38:36 -07:00
committed by Facebook GitHub Bot
parent 8bcfc493ea
commit a0bb79d84f
26 changed files with 356 additions and 249 deletions
@@ -44,6 +44,7 @@ header_search_paths = [
"$(PODS_ROOT)/Headers/Public/hermes-engine"
] : []).concat(use_frameworks ? [
"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/",
"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx/",
"$(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",
@@ -38,6 +38,7 @@ if ENV['USE_FRAMEWORKS']
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/textlayoutmanager/platform/ios\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/textinput/iostextinput\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-nativeconfig/React_nativeconfig.framework/Headers\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\""
@@ -118,7 +118,10 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
),
new PrefabPreprocessingEntry(
"rrc_view",
new Pair("../ReactCommon/react/renderer/components/view/", "react/renderer/components/view/")
[
new Pair("../ReactCommon/react/renderer/components/view/", "react/renderer/components/view/"),
new Pair("../ReactCommon/react/renderer/components/view/platform/android/", ""),
]
),
new PrefabPreprocessingEntry(
"rrc_legacyviewmanagerinterop",
@@ -105,6 +105,7 @@ Pod::Spec.new do |s|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers/\"",
"\"$(PODS_TARGET_SRCROOT)/react/renderer/textlayoutmanager/platform/ios\"",
"\"$(PODS_TARGET_SRCROOT)/react/renderer/components/textinput/iostextinput\"",
"\"$(PODS_TARGET_SRCROOT)/react/renderer/components/view/platform/cxx\"",
]
end
@@ -224,7 +225,7 @@ Pod::Spec.new do |s|
sss.dependency "Yoga"
sss.compiler_flags = folly_compiler_flags
sss.source_files = "react/renderer/components/view/**/*.{m,mm,cpp,h}"
sss.exclude_files = "react/renderer/components/view/tests"
sss.exclude_files = "react/renderer/components/view/tests", "react/renderer/components/view/platform/android"
sss.header_dir = "react/renderer/components/view"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/Yoga\"" }
end
@@ -36,6 +36,7 @@ if ENV['USE_FRAMEWORKS']
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"",
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"",
"\"$(PODS_TARGET_SRCROOT)/react/renderer/textlayoutmanager/platform/ios\"",
"\"$(PODS_TARGET_SRCROOT)/react/renderer/components/textinput/iostextinput\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"",
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
#include "ViewProps.h"
#include "BaseViewProps.h"
#include <algorithm>
@@ -18,9 +18,9 @@
namespace facebook::react {
ViewProps::ViewProps(
BaseViewProps::BaseViewProps(
const PropsParserContext &context,
ViewProps const &sourceProps,
BaseViewProps const &sourceProps,
RawProps const &rawProps,
bool shouldSetRawProps)
: YogaStylableProps(context, sourceProps, rawProps, shouldSetRawProps),
@@ -190,74 +190,7 @@ ViewProps::ViewProps(
rawProps,
"removeClippedSubviews",
sourceProps.removeClippedSubviews,
false))
#ifdef ANDROID
,
elevation(
CoreFeatures::enablePropIteratorSetter ? sourceProps.elevation
: convertRawProp(
context,
rawProps,
"elevation",
sourceProps.elevation,
{})),
nativeBackground(
CoreFeatures::enablePropIteratorSetter
? sourceProps.nativeBackground
: convertRawProp(
context,
rawProps,
"nativeBackgroundAndroid",
sourceProps.nativeBackground,
{})),
nativeForeground(
CoreFeatures::enablePropIteratorSetter
? sourceProps.nativeForeground
: convertRawProp(
context,
rawProps,
"nativeForegroundAndroid",
sourceProps.nativeForeground,
{})),
focusable(
CoreFeatures::enablePropIteratorSetter ? sourceProps.focusable
: convertRawProp(
context,
rawProps,
"focusable",
sourceProps.focusable,
{})),
hasTVPreferredFocus(
CoreFeatures::enablePropIteratorSetter
? sourceProps.hasTVPreferredFocus
: convertRawProp(
context,
rawProps,
"hasTVPreferredFocus",
sourceProps.hasTVPreferredFocus,
{})),
needsOffscreenAlphaCompositing(
CoreFeatures::enablePropIteratorSetter
? sourceProps.needsOffscreenAlphaCompositing
: convertRawProp(
context,
rawProps,
"needsOffscreenAlphaCompositing",
sourceProps.needsOffscreenAlphaCompositing,
{})),
renderToHardwareTextureAndroid(
CoreFeatures::enablePropIteratorSetter
? sourceProps.renderToHardwareTextureAndroid
: convertRawProp(
context,
rawProps,
"renderToHardwareTextureAndroid",
sourceProps.renderToHardwareTextureAndroid,
{}))
#endif
{
}
false)) {}
#define VIEW_EVENT_CASE(eventType) \
case CONSTEXPR_RAW_PROPS_KEY_HASH("on" #eventType): { \
@@ -271,7 +204,7 @@ ViewProps::ViewProps(
return; \
}
void ViewProps::setProp(
void BaseViewProps::setProp(
const PropsParserContext &context,
RawPropsPropNameHash hash,
const char *propName,
@@ -282,7 +215,7 @@ void ViewProps::setProp(
YogaStylableProps::setProp(context, hash, propName, value);
AccessibilityProps::setProp(context, hash, propName, value);
static auto defaults = ViewProps{};
static auto defaults = BaseViewProps{};
switch (hash) {
RAW_SET_PROP_SWITCH_CASE_BASIC(opacity);
@@ -326,15 +259,6 @@ void ViewProps::setProp(
VIEW_EVENT_CASE(TouchMove);
VIEW_EVENT_CASE(TouchEnd);
VIEW_EVENT_CASE(TouchCancel);
#ifdef ANDROID
RAW_SET_PROP_SWITCH_CASE_BASIC(elevation);
RAW_SET_PROP_SWITCH_CASE(nativeBackground, "nativeBackgroundAndroid");
RAW_SET_PROP_SWITCH_CASE(nativeForeground, "nativeForegroundAndroid");
RAW_SET_PROP_SWITCH_CASE_BASIC(focusable);
RAW_SET_PROP_SWITCH_CASE_BASIC(hasTVPreferredFocus);
RAW_SET_PROP_SWITCH_CASE_BASIC(needsOffscreenAlphaCompositing);
RAW_SET_PROP_SWITCH_CASE_BASIC(renderToHardwareTextureAndroid);
#endif
// BorderRadii
SET_CASCADED_RECTANGLE_CORNERS(borderRadii, "border", "Radius", value);
SET_CASCADED_RECTANGLE_EDGES(borderColors, "border", "Color", value);
@@ -380,7 +304,7 @@ static BorderRadii ensureNoOverlap(BorderRadii const &radii, Size const &size) {
};
}
BorderMetrics ViewProps::resolveBorderMetrics(
BorderMetrics BaseViewProps::resolveBorderMetrics(
LayoutMetrics const &layoutMetrics) const {
auto isRTL =
bool{layoutMetrics.layoutDirection == LayoutDirection::RightToLeft};
@@ -412,33 +336,27 @@ BorderMetrics ViewProps::resolveBorderMetrics(
};
}
bool ViewProps::getClipsContentToBounds() const {
bool BaseViewProps::getClipsContentToBounds() const {
return yogaStyle.overflow() != YGOverflowVisible;
}
#ifdef ANDROID
bool ViewProps::getProbablyMoreHorizontalThanVertical_DEPRECATED() const {
return yogaStyle.flexDirection() == YGFlexDirectionRow;
}
#endif
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList ViewProps::getDebugProps() const {
const auto &defaultViewProps = ViewProps();
SharedDebugStringConvertibleList BaseViewProps::getDebugProps() const {
const auto &defaultBaseViewProps = BaseViewProps();
return AccessibilityProps::getDebugProps() +
YogaStylableProps::getDebugProps() +
SharedDebugStringConvertibleList{
debugStringConvertibleItem(
"opacity", opacity, defaultViewProps.opacity),
"opacity", opacity, defaultBaseViewProps.opacity),
debugStringConvertibleItem(
"backgroundColor",
backgroundColor,
defaultViewProps.backgroundColor),
defaultBaseViewProps.backgroundColor),
debugStringConvertibleItem(
"zIndex", zIndex, defaultViewProps.zIndex.value_or(0)),
"zIndex", zIndex, defaultBaseViewProps.zIndex.value_or(0)),
};
}
#endif
@@ -20,16 +20,12 @@
namespace facebook::react {
class ViewProps;
using SharedViewProps = std::shared_ptr<ViewProps const>;
class ViewProps : public YogaStylableProps, public AccessibilityProps {
class BaseViewProps : public YogaStylableProps, public AccessibilityProps {
public:
ViewProps() = default;
ViewProps(
BaseViewProps() = default;
BaseViewProps(
const PropsParserContext &context,
ViewProps const &sourceProps,
BaseViewProps const &sourceProps,
RawProps const &rawProps,
bool shouldSetRawProps = true);
@@ -39,11 +35,6 @@ class ViewProps : public YogaStylableProps, public AccessibilityProps {
const char *propName,
RawValue const &value);
#ifdef ANDROID
void propsDiffMapBuffer(Props const *oldProps, MapBufferBuilder &builder)
const override;
#endif
#pragma mark - Props
// Color
@@ -81,27 +72,11 @@ class ViewProps : public YogaStylableProps, public AccessibilityProps {
Float elevation{}; /* Android-only */
#ifdef ANDROID
std::optional<NativeDrawable> nativeBackground{};
std::optional<NativeDrawable> nativeForeground{};
bool focusable{false};
bool hasTVPreferredFocus{false};
bool needsOffscreenAlphaCompositing{false};
bool renderToHardwareTextureAndroid{false};
#endif
#pragma mark - Convenience Methods
BorderMetrics resolveBorderMetrics(LayoutMetrics const &layoutMetrics) const;
bool getClipsContentToBounds() const;
#ifdef ANDROID
bool getProbablyMoreHorizontalThanVertical_DEPRECATED() const;
#endif
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
@@ -15,10 +15,17 @@ add_compile_options(
-Wno-gnu-zero-variadic-macro-arguments
-DLOG_TAG=\"Fabric\")
file(GLOB rrc_view_SRC CONFIGURE_DEPENDS *.cpp)
file(GLOB rrc_view_SRC CONFIGURE_DEPENDS
*.cpp
platform/android/react/renderer/components/view/*.cpp)
add_library(rrc_view SHARED ${rrc_view_SRC})
target_include_directories(rrc_view PUBLIC ${REACT_COMMON_DIR})
target_include_directories(rrc_view
PUBLIC
${REACT_COMMON_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/platform/android/
)
target_link_libraries(rrc_view
folly_runtime
@@ -6,12 +6,10 @@
*/
#include "AccessibilityPropsMapBuffer.h"
#include "AccessibilityProps.h"
#include <react/renderer/components/view/AccessibilityProps.h>
namespace facebook::react {
#ifdef ANDROID
static MapBuffer convertAccessibilityActions(
std::vector<AccessibilityAction> const &actions) {
MapBufferBuilder builder(actions.size());
@@ -163,6 +161,5 @@ void AccessibilityProps::propsDiffMapBuffer(
builder.putInt(AP_ROLE, static_cast<int32_t>(newProps.role));
}
}
#endif
} // namespace facebook::react
@@ -7,8 +7,6 @@
#pragma once
#ifdef ANDROID
#include <react/renderer/mapbuffer/MapBuffer.h>
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
@@ -35,4 +33,3 @@ constexpr MapBuffer::Key ACCESSIBILITY_ACTION_NAME = 0;
constexpr MapBuffer::Key ACCESSIBILITY_ACTION_LABEL = 1;
} // namespace facebook::react
#endif
@@ -0,0 +1,105 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/debug/react_native_expect.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/graphics/Float.h>
namespace facebook::react {
struct NativeDrawable {
enum class Kind : uint8_t {
Ripple,
ThemeAttr,
};
struct Ripple {
std::optional<int32_t> color{};
std::optional<Float> rippleRadius{};
bool borderless{false};
bool operator==(const Ripple &rhs) const {
return std::tie(this->color, this->borderless, this->rippleRadius) ==
std::tie(rhs.color, rhs.borderless, rhs.rippleRadius);
}
};
std::string themeAttr;
Ripple ripple;
Kind kind;
bool operator==(const NativeDrawable &rhs) const {
if (this->kind != rhs.kind) {
return false;
}
switch (this->kind) {
case Kind::ThemeAttr:
return this->themeAttr == rhs.themeAttr;
case Kind::Ripple:
return this->ripple == rhs.ripple;
}
}
bool operator!=(const NativeDrawable &rhs) const {
return !(*this == rhs);
}
~NativeDrawable() = default;
};
static inline void fromRawValue(
const PropsParserContext & /*context*/,
RawValue const &rawValue,
NativeDrawable &result) {
auto map = (butter::map<std::string, RawValue>)rawValue;
auto typeIterator = map.find("type");
react_native_expect(
typeIterator != map.end() && typeIterator->second.hasType<std::string>());
std::string type = (std::string)typeIterator->second;
if (type == "ThemeAttrAndroid") {
auto attrIterator = map.find("attribute");
react_native_expect(
attrIterator != map.end() &&
attrIterator->second.hasType<std::string>());
result = NativeDrawable{
(std::string)attrIterator->second,
{},
NativeDrawable::Kind::ThemeAttr,
};
} else if (type == "RippleAndroid") {
auto color = map.find("color");
auto borderless = map.find("borderless");
auto rippleRadius = map.find("rippleRadius");
result = NativeDrawable{
std::string{},
NativeDrawable::Ripple{
color != map.end() && color->second.hasType<int32_t>()
? (int32_t)color->second
: std::optional<int32_t>{},
rippleRadius != map.end() && rippleRadius->second.hasType<Float>()
? (Float)rippleRadius->second
: std::optional<Float>{},
borderless != map.end() && borderless->second.hasType<bool>()
? (bool)borderless->second
: false,
},
NativeDrawable::Kind::Ripple,
};
} else {
LOG(ERROR) << "Unknown native drawable type: " << type;
react_native_expect(false);
}
}
} // namespace facebook::react
@@ -0,0 +1,125 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "ViewProps.h"
#include <algorithm>
#include <react/renderer/components/view/conversions.h>
#include <react/renderer/components/view/propsConversions.h>
#include <react/renderer/core/graphicsConversions.h>
#include <react/renderer/core/propsConversions.h>
#include <react/utils/CoreFeatures.h>
namespace facebook::react {
ViewProps::ViewProps(
const PropsParserContext &context,
ViewProps const &sourceProps,
RawProps const &rawProps,
bool shouldSetRawProps)
: BaseViewProps(context, sourceProps, rawProps, shouldSetRawProps),
nativeBackground(
CoreFeatures::enablePropIteratorSetter
? sourceProps.nativeBackground
: convertRawProp(
context,
rawProps,
"nativeBackgroundAndroid",
sourceProps.nativeBackground,
{})),
nativeForeground(
CoreFeatures::enablePropIteratorSetter
? sourceProps.nativeForeground
: convertRawProp(
context,
rawProps,
"nativeForegroundAndroid",
sourceProps.nativeForeground,
{})),
focusable(
CoreFeatures::enablePropIteratorSetter ? sourceProps.focusable
: convertRawProp(
context,
rawProps,
"focusable",
sourceProps.focusable,
{})),
hasTVPreferredFocus(
CoreFeatures::enablePropIteratorSetter
? sourceProps.hasTVPreferredFocus
: convertRawProp(
context,
rawProps,
"hasTVPreferredFocus",
sourceProps.hasTVPreferredFocus,
{})),
needsOffscreenAlphaCompositing(
CoreFeatures::enablePropIteratorSetter
? sourceProps.needsOffscreenAlphaCompositing
: convertRawProp(
context,
rawProps,
"needsOffscreenAlphaCompositing",
sourceProps.needsOffscreenAlphaCompositing,
{})),
renderToHardwareTextureAndroid(
CoreFeatures::enablePropIteratorSetter
? sourceProps.renderToHardwareTextureAndroid
: convertRawProp(
context,
rawProps,
"renderToHardwareTextureAndroid",
sourceProps.renderToHardwareTextureAndroid,
{})) {}
#define VIEW_EVENT_CASE(eventType) \
case CONSTEXPR_RAW_PROPS_KEY_HASH("on" #eventType): { \
const auto offset = ViewEvents::Offset::eventType; \
ViewEvents defaultViewEvents{}; \
bool res = defaultViewEvents[offset]; \
if (value.hasValue()) { \
fromRawValue(context, value, res); \
} \
events[offset] = res; \
return; \
}
void ViewProps::setProp(
const PropsParserContext &context,
RawPropsPropNameHash hash,
const char *propName,
RawValue const &value) {
// All Props structs setProp methods must always, unconditionally,
// call all super::setProp methods, since multiple structs may
// reuse the same values.
BaseViewProps::setProp(context, hash, propName, value);
static auto defaults = ViewProps{};
switch (hash) {
RAW_SET_PROP_SWITCH_CASE_BASIC(elevation);
RAW_SET_PROP_SWITCH_CASE(nativeBackground, "nativeBackgroundAndroid");
RAW_SET_PROP_SWITCH_CASE(nativeForeground, "nativeForegroundAndroid");
RAW_SET_PROP_SWITCH_CASE_BASIC(focusable);
RAW_SET_PROP_SWITCH_CASE_BASIC(hasTVPreferredFocus);
RAW_SET_PROP_SWITCH_CASE_BASIC(needsOffscreenAlphaCompositing);
RAW_SET_PROP_SWITCH_CASE_BASIC(renderToHardwareTextureAndroid);
}
}
bool ViewProps::getProbablyMoreHorizontalThanVertical_DEPRECATED() const {
return yogaStyle.flexDirection() == YGFlexDirectionRow;
}
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList ViewProps::getDebugProps() const {
return BaseViewProps::getDebugProps();
}
#endif
} // namespace facebook::react
@@ -0,0 +1,64 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/renderer/components/view/BaseViewProps.h>
#include <react/renderer/components/view/NativeDrawable.h>
#include <react/renderer/components/view/primitives.h>
#include <react/renderer/core/LayoutMetrics.h>
#include <react/renderer/core/Props.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Transform.h>
#include <optional>
namespace facebook::react {
class ViewProps;
using SharedViewProps = std::shared_ptr<ViewProps const>;
class ViewProps : public BaseViewProps {
public:
ViewProps() = default;
ViewProps(
const PropsParserContext &context,
ViewProps const &sourceProps,
RawProps const &rawProps,
bool shouldSetRawProps = true);
void setProp(
const PropsParserContext &context,
RawPropsPropNameHash hash,
const char *propName,
RawValue const &value);
void propsDiffMapBuffer(Props const *oldProps, MapBufferBuilder &builder)
const override;
#pragma mark - Props
std::optional<NativeDrawable> nativeBackground{};
std::optional<NativeDrawable> nativeForeground{};
bool focusable{false};
bool hasTVPreferredFocus{false};
bool needsOffscreenAlphaCompositing{false};
bool renderToHardwareTextureAndroid{false};
#pragma mark - Convenience Methods
bool getProbablyMoreHorizontalThanVertical_DEPRECATED() const;
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList getDebugProps() const override;
#endif
};
} // namespace facebook::react
@@ -5,13 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/
#ifdef ANDROID
#include "ViewPropsMapBuffer.h"
#include "ViewProps.h"
#include "viewPropConversions.h"
#include <react/renderer/components/view/viewPropConversions.h>
#include <react/renderer/core/graphicsConversions.h>
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
@@ -192,5 +189,3 @@ void ViewProps::propsDiffMapBuffer(
}
} // namespace facebook::react
#endif
@@ -11,7 +11,6 @@
namespace facebook::react {
#ifdef ANDROID
constexpr MapBuffer::Key VP_BACKFACE_VISIBILITY = 9;
constexpr MapBuffer::Key VP_BG_COLOR = 10;
constexpr MapBuffer::Key VP_BORDER_COLOR = 11;
@@ -48,6 +47,5 @@ constexpr MapBuffer::Key VP_BORDER_CURVES = 45;
// Yoga values
constexpr MapBuffer::Key YG_BORDER_WIDTH = 100;
constexpr MapBuffer::Key YG_OVERFLOW = 101;
#endif
} // namespace facebook::react
@@ -5,13 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/
#ifdef ANDROID
#include "ViewProps.h"
#include "ViewPropsMapBuffer.h"
#include "viewPropConversions.h"
#include <react/renderer/components/view/viewPropConversions.h>
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
namespace facebook::react {
@@ -81,5 +78,3 @@ void YogaStylableProps::propsDiffMapBuffer(
}
} // namespace facebook::react
#endif
@@ -0,0 +1,15 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/renderer/components/view/BaseViewProps.h>
namespace facebook::react {
using ViewProps = BaseViewProps;
using SharedViewProps = std::shared_ptr<ViewProps const>;
} // namespace facebook::react
@@ -278,47 +278,4 @@ struct BorderMetrics {
}
};
#ifdef ANDROID
struct NativeDrawable {
enum class Kind : uint8_t {
Ripple,
ThemeAttr,
};
struct Ripple {
std::optional<int32_t> color{};
std::optional<Float> rippleRadius{};
bool borderless{false};
bool operator==(const Ripple &rhs) const {
return std::tie(this->color, this->borderless, this->rippleRadius) ==
std::tie(rhs.color, rhs.borderless, rhs.rippleRadius);
}
};
std::string themeAttr;
Ripple ripple;
Kind kind;
bool operator==(const NativeDrawable &rhs) const {
if (this->kind != rhs.kind)
return false;
switch (this->kind) {
case Kind::ThemeAttr:
return this->themeAttr == rhs.themeAttr;
case Kind::Ripple:
return this->ripple == rhs.ripple;
}
}
bool operator!=(const NativeDrawable &rhs) const {
return !(*this == rhs);
}
~NativeDrawable() = default;
};
#endif
} // namespace facebook::react
@@ -738,56 +738,4 @@ static inline ViewEvents convertRawProp(
return result;
}
#ifdef ANDROID
static inline void fromRawValue(
const PropsParserContext &context,
RawValue const &rawValue,
NativeDrawable &result) {
auto map = (butter::map<std::string, RawValue>)rawValue;
auto typeIterator = map.find("type");
react_native_expect(
typeIterator != map.end() && typeIterator->second.hasType<std::string>());
std::string type = (std::string)typeIterator->second;
if (type == "ThemeAttrAndroid") {
auto attrIterator = map.find("attribute");
react_native_expect(
attrIterator != map.end() &&
attrIterator->second.hasType<std::string>());
result = NativeDrawable{
(std::string)attrIterator->second,
{},
NativeDrawable::Kind::ThemeAttr,
};
} else if (type == "RippleAndroid") {
auto color = map.find("color");
auto borderless = map.find("borderless");
auto rippleRadius = map.find("rippleRadius");
result = NativeDrawable{
std::string{},
NativeDrawable::Ripple{
color != map.end() && color->second.hasType<int32_t>()
? (int32_t)color->second
: std::optional<int32_t>{},
rippleRadius != map.end() && rippleRadius->second.hasType<Float>()
? (Float)rippleRadius->second
: std::optional<Float>{},
borderless != map.end() && borderless->second.hasType<bool>()
? (bool)borderless->second
: false,
},
NativeDrawable::Kind::Ripple,
};
} else {
LOG(ERROR) << "Unknown native drawable type: " << type;
react_native_expect(false);
}
}
#endif
} // namespace facebook::react
@@ -591,7 +591,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
specs = get_podspec_no_fabric_no_script()
specs["pod_target_xcconfig"]["FRAMEWORK_SEARCH_PATHS"].concat([])
specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-FabricImage/React_FabricImage.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\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"")
specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-FabricImage/React_FabricImage.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\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"")
specs[:dependencies].merge!({
'React-graphics': [],
@@ -129,7 +129,7 @@ class NewArchitectureTests < Test::Unit::TestCase
# Assert
assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags)
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"${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}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.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-ImageManager/React_ImageManager.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"")
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"${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}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.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-ImageManager/React_ImageManager.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"")
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1")
assert_equal(
@@ -170,7 +170,7 @@ class NewArchitectureTests < Test::Unit::TestCase
# Assert
assert_equal(spec.compiler_flags, "-Wno-nullability-completeness #{NewArchitectureHelper.folly_compiler_flags}")
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"${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}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.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-ImageManager/React_ImageManager.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"")
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"${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}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.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-ImageManager/React_ImageManager.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers\"")
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
assert_equal(
spec.dependencies,
@@ -666,7 +666,7 @@ class UtilsTests < Test::Unit::TestCase
# Assert
user_project_mock.build_configurations.each do |config|
received_search_path = config.build_settings["HEADER_SEARCH_PATHS"]
expected_search_path = "$(inherited) ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios ${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios"
expected_search_path = "$(inherited) ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx ${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios"
assert_equal(expected_search_path, received_search_path)
end
@@ -674,7 +674,7 @@ class UtilsTests < Test::Unit::TestCase
if pod_name == "SecondTarget"
target_installation_result.native_target.build_configurations.each do |config|
received_search_path = config.build_settings["HEADER_SEARCH_PATHS"]
expected_Search_path = "$(inherited) \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/boost\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.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}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\""
expected_Search_path = "$(inherited) \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/boost\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.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}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\""
assert_equal(received_search_path, expected_Search_path)
end
else
@@ -93,6 +93,7 @@ class CodegenUtils
"\"$(PODS_ROOT)/DoubleConversion\"",
"\"$(PODS_TARGET_SRCROOT)\"",
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\"",
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"",
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-FabricImage/React_FabricImage.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\"",
@@ -105,6 +105,7 @@ class NewArchitectureHelper
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\""
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\""
@@ -228,6 +228,7 @@ class ReactNativePodsUtils
header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers")
header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core")
header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios")
header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx")
header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers")
header_search_paths = self.add_search_path_if_not_included(header_search_paths, "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios")
@@ -384,6 +385,7 @@ class ReactNativePodsUtils
ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-RCTFabric", [
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.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\"",