Open frannale opened 3 weeks ago
I have the same issue.
I'm facing the same issue RN "0.76.1" works fine on RN "0.75.3"
same issue
same issue
same issue
Please react to the original issue with 👍 instead of commenting.
As a temporary workaround, or with a patch-package fix, you may change the following line in:
node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js
// ...
enableAntialiasing: ?boolean,
enableDoubleTapZoom: ?boolean, // add this line
fitPolicy: ?Int32,
// ...
Then re-run pod install
to re-run the code generation. After this, you can confirm the new property was generated by inspecting the file: ios/build/generated/ios/react/renderer/components/rnpdf/Props.h
which should now contain:
// ...
bool enableAntialiasing{false};
bool enableDoubleTapZoom{false}; // this will now have been added if the codegen works
int fitPolicy{0};
// ...
@scarlac sorry for being inpatient, but do you by chance know when can we expect the new version of package to be released with this fix?
@scarlac Double-clicking on the PDF viewer in iOS causes the app to crash. It seems that additional fixes may be needed to apply a proper patch to the package.
@scarlac sorry for being inpatient, but do you by chance know when can we expect the new version of package to be released with this fix?
Sorry, I'm not the maintainer of this repo, so I don't know.
I had other issues while migrating so I eventually gave up, so it's possible my patch isn't sufficient, as some are indicating.
@scarlac Double-clicking on the PDF viewer in iOS causes the app to crash. It seems that additional fixes may be needed to apply a proper patch to the package.
Commenting out line 735 in node_modules/react-native-pdf/ios/RNPDFPdf/RNPDFPdfView.mm
fixed the double tap issue for me on iOS:
_onChange(@{ @"message": @"pageDoubleTap" });
to
// _onChange(@{ @"message": @"pageDoubleTap" });
This gives you the added "feature" of selecting text by a tap followed immediately by a drag. (Maybe it was already like that?)
As a temporary workaround, or with a patch-package fix, you may change the following line in:
node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js
// ... enableAntialiasing: ?boolean, enableDoubleTapZoom: ?boolean, // add this line fitPolicy: ?Int32, // ...
Then re-run
pod install
to re-run the code generation. After this, you can confirm the new property was generated by inspecting the file:ios/build/generated/ios/react/renderer/components/rnpdf/Props.h
which should now contain:// ... bool enableAntialiasing{false}; bool enableDoubleTapZoom{false}; // this will now have been added if the codegen works int fitPolicy{0}; // ...
Created pull request for fix
As a temporary workaround, or with a patch-package fix, you may change the following line in:
node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js
// ... enableAntialiasing: ?boolean, enableDoubleTapZoom: ?boolean, // add this line fitPolicy: ?Int32, // ...
Then re-run
pod install
to re-run the code generation. After this, you can confirm the new property was generated by inspecting the file:ios/build/generated/ios/react/renderer/components/rnpdf/Props.h
which should now contain:// ... bool enableAntialiasing{false}; bool enableDoubleTapZoom{false}; // this will now have been added if the codegen works int fitPolicy{0}; // ...
it's worked for me.
What
react-native
version are you using? 0.76.1What
react-native-pdf
version are you using? 6.75What platform does your issue occur on? ios
Describe your issue as precisely as possible : 1) Build IOS
In migration process to RN 0.76.1 this brokes, works ok in RN 0.73.9