Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run time crash due to use of depricated UI Image apis #514

Open
vibhor-d11 opened this issue Mar 19, 2024 · 0 comments
Open

Run time crash due to use of depricated UI Image apis #514

vibhor-d11 opened this issue Mar 19, 2024 · 0 comments

Comments

@vibhor-d11
Copy link
Contributor

vibhor-d11 commented Mar 19, 2024

bug report

Version & Platform

"react-native": "0.72.5"
"react-native-view-shot": "3.5.0"

Platform: iOS

Issue Overview:

Building with Xcode 15 for iOS 17 lead to the run-time crash when using a deprecated UIGraphicsBeginImageContextWithOptions code on the UIImage instances with .zero size.

Following UI Image apis are depricated from ios 17 when build with Xcode 15:

  1. https://developer.apple.com/documentation/uikit/1623912-uigraphicsbeginimagecontextwitho
  2. https://developer.apple.com/documentation/uikit/1623924-uigraphicsgetimagefromcurrentima

Instead need to use UIGraphicsImageRenderer and UIGraphicsImageRendererContext.

Steps to reproduce the behavior

Building with Xcode 15 for iOS 17 lead to the run-time crash when using a deprecated UIGraphicsBeginImageContextWithOptions code on the UIImage instances with .zero size.

Pr to address this fix : #515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant