software-mansion / react-native-svg

SVG library for React Native, React Native Web, and plain React web projects.
MIT License
7.51k stars 1.14k forks source link

Broken 'UIGraphicsBeginImageContextWithOptions' on macOS #2528

Closed gabrieldonadel closed 1 week ago

gabrieldonadel commented 2 weeks ago

Description

On react-native-macos 0.76, UIGraphicsBeginImageContextWithOptions and other UIGraphics directives were removed and we should now use RCTUIGraphicsImageRenderer

more details in https://github.com/microsoft/react-native-macos/pull/2209/

Error:

/Users/gabriel/Workspace/expo/ExpoMenuBar/node_modules/react-native-svg/apple/Elements/RNSVGSvgView.mm:366:3: Use of undeclared identifier 'UIGraphicsBeginImageContextWithOptions'

Steps to reproduce

  1. create an new project using react-native-macos >= 0.76
  2. Add react-native-svg
  3. try to compile

Snack or a link to a repository

https://github.com/expo/orbit

SVG version

15.8.0

React Native version

0.76.1

Platforms

macOS

JavaScript runtime

None

Workflow

None

Architecture

Paper (Old Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

github-actions[bot] commented 2 weeks ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?