th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.14k stars 197 forks source link

Fixes for tvOS #412

Closed jacobp100 closed 1 year ago

jacobp100 commented 1 year ago

Fixes #411

douglowder commented 1 year ago

@janicduplessis I'm sorry I didn't see this... I think that it is also necessary to update the podspec to tvOS 12.4, as in this patch:

https://github.com/react-native-tvos/TVReanimated/blob/main/patches/react-native-safe-area-context%2B4.5.3.patch

I'll test 4.7.0 and see if other changes are needed.

douglowder commented 1 year ago

Confirmed that you do need to update the tvOS version to 12.4. If you do not, you get a build error. I'll create a PR for this.

› Compiling react-native-safe-area-context Pods/react-native-safe-area-context-tvOS » RNCSafeAreaViewShadowNode.cpp

❌  (ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/conversions.h:111:39)

  109 |     case YGUnitPercent:
  110 |       return base.has_value()
> 111 |           ? std::optional<Float>(base.value() * floatFromYogaFloat(value.value))
      |                                       ^ 'value' is unavailable: introduced in tvOS 12.0
  112 |           : std::optional<Float>();
  113 |     case YGUnitAuto:
  114 |       return {};