wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.58k stars 540 forks source link

iOS only - Exception thrown while executing UI block: - [RNPDFPdfView setOnClick:]: unrecognized selector send to instance #855

Open GaryGiebler opened 1 month ago

GaryGiebler commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

@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.