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

IOS debug error for RNViewShot.captureRef: Argument NSNumber has unspecified nullability #547

Closed
holakmateusz opened this issue Nov 15, 2024 · 8 comments · Fixed by bluesky-social/social-app#6995

Comments

@holakmateusz
Copy link

bug report

IOS debug error for RNViewShot.captureRef: Argument NSNumber has unspecified nullability

Version & Platform

"expo": "51.0.28",
"react-native": "0.74.2",
"react-native-view-shot": "^4.0.0",

Platform: iOS

Expected behavior

There is no red error in iOS debug mode

Actual behavior

It shows red error with LogBox as it shown below:
IMG_0156

Steps to reproduce the behavior

  1. invoke captureRef() in debug mode on iOS
@alehano
Copy link

alehano commented Nov 16, 2024

Same issue here

@outaTiME
Copy link

Sadly, same here after updating to version 4.x

@DimaKogut
Copy link

Save here! version 4.x

@MehdiSv
Copy link

MehdiSv commented Nov 21, 2024

Same here

@keeganthomp
Copy link

+1

@tosettil-polimi
Copy link
Contributor

tosettil-polimi commented Nov 22, 2024

Temporary Nullability Fix for [email protected]

Prerequisites

If patch-package is not installed:

yarn add patch-package -D

Patch Steps

  1. Open node_modules/react-native-view-shot/ios/RNViewShot.mm
  2. Modify line 48 from:
    RCT_EXPORT_METHOD(captureRef:(NSNumber *)target
    to:
    RCT_EXPORT_METHOD(captureRef:(nonnull NSNumber *)target
  3. Run patch command:
    yarn patch-package react-native-view-shot

Recommended

@Yusang-park
Copy link

It's now fixed on v.4.0.3

@ils-anwarshah
Copy link

upgrading to v.4.0.3 solved my problem

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

Successfully merging a pull request may close this issue.

10 participants