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 only - Exception thrown while executing UI block: - [RNPDFPdfView setOnClick:]: unrecognized selector send to instance #855

Open
GaryGiebler opened this issue Jul 24, 2024 · 2 comments

Comments

@GaryGiebler
Copy link

What react-native version are you using? 0.73.7

What react-native-pdf version are you using? 6.7.5

What platform does your issue occur on? (android/ios/both) iOS

Describe your issue as precisely as possible :

  1. Attempt to display PDF on iOS
  2. Above error occurs

SImple fix is to add setOnClick to RNPDFPdfView (PR to follow - tested - works).

@GaryGiebler GaryGiebler changed the title iOS only - Exception thrown while executing UI block: - [RCTPDFPdfView setOnClick:]: unrecognized selector send to instance iOS only - Exception thrown while executing UI block: - [RNPDFPdfView setOnClick:]: unrecognized selector send to instance Jul 24, 2024
@GaryGiebler
Copy link
Author

Add following method to RNPDFPdfView.mm and .h file:

- (void)setOnClick:(id)sender { // Implementation can be left empty - this prevents an exception in RN 0.73 }
I can't push code to a new branch - I get an authentication error.

@GaryGiebler
Copy link
Author

@wonday Can you make this change and push a new release? I get an authentication error when I tried to push a new branch and we need to fix this bug as we can't view PDFs on iOS.

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