Skip to content

Commit 9c226ee

Browse files
revert: chore(63871): update react-native-pdf to 6.7.7
1 parent 2c4dcba commit 9c226ee

6 files changed

Lines changed: 39 additions & 23 deletions

File tree

package-lock.json

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"react-native-nitro-sqlite": "9.1.10",
187187
"react-native-onyx": "2.0.138",
188188
"react-native-pager-view": "6.5.3",
189-
"react-native-pdf": "6.7.7",
189+
"react-native-pdf": "6.7.3",
190190
"react-native-performance": "^5.1.4",
191191
"react-native-permissions": "^5.4.0",
192192
"react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#07d60d78d4772d47afd7a744940fc6b6d1881806",
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# `react-native-pdf` patches
22

3-
### [react-native-pdf+6.7.7+001+16kb-pages.patch](react-native-pdf+6.7.7+001+16kb-pages.patch)
3+
### [react-native-pdf+6.7.3+001+update-podspec-to-support-new-arch.patch](react-native-pdf+6.7.3+001+update-podspec-to-support-new-arch.patch)
44

55
- Reason:
66

77
```
8-
6.7.7 includes patch for 16kb pages on Android (required for Android 15+)
8+
This patch updates the react-native-pdf.podspec to ensure compatibility with React Native's New Architecture on iOS by replacing manual dependency declarations
9+
with Meta's recommended `install_modules_dependencies` function
910
```
1011
11-
- Upstream PR/issue: https://github.com/wonday/react-native-pdf/issues/947#issuecomment-2999541826
12+
- Upstream PR/issue: https://github.com/wonday/react-native-pdf/pull/803
1213
- E/App issue: 🛑
13-
- PR Introducing Patch: https://github.com/wonday/react-native-pdf/pull/950
14+
- PR Introducing Patch: https://github.com/Expensify/App/pull/13767
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
diff --git a/node_modules/react-native-pdf/react-native-pdf.podspec b/node_modules/react-native-pdf/react-native-pdf.podspec
2+
index fb36140..5d5f19e 100644
3+
--- a/node_modules/react-native-pdf/react-native-pdf.podspec
4+
+++ b/node_modules/react-native-pdf/react-native-pdf.podspec
5+
@@ -17,24 +17,11 @@ Pod::Spec.new do |s|
6+
s.framework = "PDFKit"
7+
8+
if fabric_enabled
9+
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
10+
-
11+
- s.pod_target_xcconfig = {
12+
- 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"',
13+
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
14+
- }
15+
s.platforms = { ios: '11.0', tvos: '11.0' }
16+
- s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'
17+
s.source_files = 'ios/**/*.{h,m,mm,cpp}'
18+
s.requires_arc = true
19+
20+
- s.dependency "React"
21+
- s.dependency "React-RCTFabric"
22+
- s.dependency "React-Codegen"
23+
- s.dependency "RCT-Folly"
24+
- s.dependency "RCTRequired"
25+
- s.dependency "RCTTypeSafety"
26+
- s.dependency "ReactCommon/turbomodule/core"
27+
+ install_modules_dependencies(s)
28+
else
29+
s.platform = :ios, '8.0'
30+
s.source_files = 'ios/**/*.{h,m,mm}'

patches/react-native-pdf/react-native-pdf+6.7.7+001+16kb-pages.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/components/PDFThumbnail/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type PDFThumbnailProps = {
1414
enabled?: boolean;
1515

1616
/** Fit policy for the PDF thumbnail */
17-
fitPolicy?: 0 | 1 | 2;
17+
fitPolicy?: number;
1818

1919
/** Callback to call if PDF is password protected */
2020
onPassword?: () => void;

0 commit comments

Comments
 (0)