react-native-pdf-jsi 2.2.5 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -35,6 +35,28 @@ Starting November 1, 2025, Google Play will require apps to support 16KB page si
|
|
|
35
35
|
- ✅ **Google Play Approved** - Meets all current and future requirements
|
|
36
36
|
- ✅ **Drop-in Replacement** - Easy migration from existing libraries
|
|
37
37
|
|
|
38
|
+
## 🎉 Version 2.2.7 - iOS Codegen Fix & New Architecture Support!
|
|
39
|
+
|
|
40
|
+
**Critical fix for React Native 0.79+ compatibility and iOS codegen integration!**
|
|
41
|
+
|
|
42
|
+
### 🚀 **What's New in v2.2.7:**
|
|
43
|
+
- **🔧 iOS Component Provider** - Added ios.componentProvider to codegenConfig for React Native 0.79+ compatibility
|
|
44
|
+
- **✅ Codegen Compliance** - Resolved [DEPRECATED] warning during pod install
|
|
45
|
+
- **✅ New Architecture Ready** - Full compatibility with React Native's New Architecture
|
|
46
|
+
- **✅ Podspec Fix** - Corrected podspec filename reference in package.json
|
|
47
|
+
- **✅ Future-Proof** - Ensures compatibility with future React Native versions
|
|
48
|
+
|
|
49
|
+
## 🎉 Version 2.2.6 - Enhanced iOS JSI Integration!
|
|
50
|
+
|
|
51
|
+
**Major improvements to iOS JSI functionality and method forwarding!**
|
|
52
|
+
|
|
53
|
+
### 🚀 **What's New in v2.2.6:**
|
|
54
|
+
- **🚀 iOS JSI Enhancement** - Comprehensive JSI method declarations and forwarding
|
|
55
|
+
- **✅ JSI Availability Check** - Added checkJSIAvailability method for iOS
|
|
56
|
+
- **✅ Method Forwarding** - All JSI methods now properly forwarded on iOS
|
|
57
|
+
- **✅ Better Integration** - Enhanced iOS bridge integration with PDFJSIManager
|
|
58
|
+
- **✅ Error Handling** - Improved error handling for iOS JSI operations
|
|
59
|
+
|
|
38
60
|
## 🎉 Version 2.2.5 - iOS Pod Install Fix!
|
|
39
61
|
|
|
40
62
|
**Resolves iOS pod installation issues with correct podspec configuration!**
|
|
@@ -921,7 +943,35 @@ const Pdf = PdfModule.default;
|
|
|
921
943
|
|
|
922
944
|
## 📝 Changelog
|
|
923
945
|
|
|
924
|
-
### v2.2.
|
|
946
|
+
### v2.2.7 (2025) - Latest ✅ IOS CODEGEN FIX & NEW ARCHITECTURE SUPPORT
|
|
947
|
+
|
|
948
|
+
#### 🔧 **iOS Codegen & New Architecture Fixes**
|
|
949
|
+
- **Component Provider**: Added `ios.componentProvider: "RNPDFPdfView"` to codegenConfig in package.json
|
|
950
|
+
- **Codegen Compliance**: Resolved React Native 0.79+ deprecation warning: "react-native-pdf-jsi should add the 'ios.componentProvider' property in their codegenConfig"
|
|
951
|
+
- **Podspec Reference**: Fixed podspec filename from `react-native-pdf.podspec` to `react-native-pdf-jsi.podspec` in files array
|
|
952
|
+
- **New Architecture Ready**: Full compatibility with React Native's New Architecture and Fabric components
|
|
953
|
+
|
|
954
|
+
#### 📊 **Compatibility Improvements**
|
|
955
|
+
- **React Native 0.79+**: Full support for latest React Native versions
|
|
956
|
+
- **Pod Install Fix**: No more deprecation warnings during `pod install`
|
|
957
|
+
- **Codegen Integration**: Proper iOS component provider configuration for codegen system
|
|
958
|
+
- **Future-Proof**: Ensures compatibility with upcoming React Native releases
|
|
959
|
+
|
|
960
|
+
### v2.2.6 (2025) - ✅ ENHANCED IOS JSI INTEGRATION
|
|
961
|
+
|
|
962
|
+
#### 🚀 **iOS JSI Enhancements**
|
|
963
|
+
- **JSI Method Declarations**: Added comprehensive JSI method declarations in PDFJSIManager.h
|
|
964
|
+
- **Method Forwarding**: Implemented JSI method forwarding in RNPDFPdfViewManager
|
|
965
|
+
- **JSI Availability Check**: Added checkJSIAvailability method for iOS JSI detection
|
|
966
|
+
- **All JSI Methods**: Forward renderPageDirect, getPageMetrics, preloadPagesDirect, getCacheMetrics, clearCacheDirect, optimizeMemory, searchTextDirect, getPerformanceMetrics, setRenderQuality
|
|
967
|
+
|
|
968
|
+
#### 📊 **iOS Integration Improvements**
|
|
969
|
+
- **Bridge Integration**: Enhanced iOS bridge integration with PDFJSIManager
|
|
970
|
+
- **Error Handling**: Improved error handling for iOS JSI operations
|
|
971
|
+
- **JSI Stats**: Added getJSIStats method for iOS JSI status
|
|
972
|
+
- **Logging**: Better logging for JSI availability and operations
|
|
973
|
+
|
|
974
|
+
### v2.2.5 (2025) - ✅ IOS POD INSTALL FIX
|
|
925
975
|
|
|
926
976
|
#### 🐛 **iOS Pod Installation Fix**
|
|
927
977
|
- **Pod Install Error Fix**: Resolved pod installation errors on iOS
|
|
@@ -1541,7 +1591,7 @@ For issues and questions:
|
|
|
1541
1591
|
|
|
1542
1592
|
*Transform your PDF viewing experience with enterprise-grade performance and reliability.*
|
|
1543
1593
|
|
|
1544
|
-
**v2.2.
|
|
1594
|
+
**v2.2.7 - iOS Codegen Fix & New Architecture Support**
|
|
1545
1595
|
**Copyright (c) 2025-present, Punith M (punithm300@gmail.com). Enhanced PDF JSI Integration. All rights reserved.**
|
|
1546
1596
|
|
|
1547
1597
|
*Original work Copyright (c) 2017-present, Wonday (@wonday.org). All rights reserved.*
|
|
@@ -6,10 +6,62 @@
|
|
|
6
6
|
* Provides React Native bridge integration for JSI PDF functions
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
#import <React/RCTBridgeModule.h>
|
|
11
|
-
#import <React/RCTEventEmitter.h>
|
|
12
|
-
|
|
13
|
-
@interface PDFJSIManager : RCTEventEmitter <RCTBridgeModule>
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <React/RCTBridgeModule.h>
|
|
11
|
+
#import <React/RCTEventEmitter.h>
|
|
12
|
+
|
|
13
|
+
@interface PDFJSIManager : RCTEventEmitter <RCTBridgeModule>
|
|
14
|
+
|
|
15
|
+
// JSI Method Declarations
|
|
16
|
+
- (void)renderPageDirect:(NSString *)pdfId
|
|
17
|
+
pageNumber:(NSInteger)pageNumber
|
|
18
|
+
scale:(double)scale
|
|
19
|
+
base64Data:(NSString *)base64Data
|
|
20
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
21
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
22
|
+
|
|
23
|
+
- (void)getPageMetrics:(NSString *)pdfId
|
|
24
|
+
pageNumber:(NSInteger)pageNumber
|
|
25
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
26
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
27
|
+
|
|
28
|
+
- (void)preloadPagesDirect:(NSString *)pdfId
|
|
29
|
+
startPage:(NSInteger)startPage
|
|
30
|
+
endPage:(NSInteger)endPage
|
|
31
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
32
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
33
|
+
|
|
34
|
+
- (void)getCacheMetrics:(NSString *)pdfId
|
|
35
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
36
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
37
|
+
|
|
38
|
+
- (void)clearCacheDirect:(NSString *)pdfId
|
|
39
|
+
cacheType:(NSString *)cacheType
|
|
40
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
41
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
42
|
+
|
|
43
|
+
- (void)optimizeMemory:(NSString *)pdfId
|
|
44
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
45
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
46
|
+
|
|
47
|
+
- (void)searchTextDirect:(NSString *)pdfId
|
|
48
|
+
searchTerm:(NSString *)searchTerm
|
|
49
|
+
startPage:(NSInteger)startPage
|
|
50
|
+
endPage:(NSInteger)endPage
|
|
51
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
52
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
53
|
+
|
|
54
|
+
- (void)getPerformanceMetrics:(NSString *)pdfId
|
|
55
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
56
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
57
|
+
|
|
58
|
+
- (void)setRenderQuality:(NSString *)pdfId
|
|
59
|
+
quality:(NSInteger)quality
|
|
60
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
61
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
62
|
+
|
|
63
|
+
- (void)check16KBSupport:(RCTPromiseResolveBlock)resolve
|
|
64
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
65
|
+
|
|
66
|
+
@end
|
|
67
|
+
|
|
@@ -6,13 +6,18 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
#if __has_include(<React/RCTAssert.h>)
|
|
10
|
-
#import <React/RCTViewManager.h>
|
|
11
|
-
#else
|
|
12
|
-
#import "RCTViewManager.h"
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@interface RNPDFPdfViewManager : RCTViewManager
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
#if __has_include(<React/RCTAssert.h>)
|
|
10
|
+
#import <React/RCTViewManager.h>
|
|
11
|
+
#else
|
|
12
|
+
#import "RCTViewManager.h"
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@interface RNPDFPdfViewManager : RCTViewManager
|
|
17
|
+
|
|
18
|
+
// JSI availability check
|
|
19
|
+
- (void)checkJSIAvailability:(RCTPromiseResolveBlock)resolve
|
|
20
|
+
rejecter:(RCTPromiseRejectBlock)reject;
|
|
21
|
+
|
|
22
|
+
@end
|
|
23
|
+
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
#import "RNPDFPdfViewManager.h"
|
|
12
12
|
#import "RNPDFPdfView.h"
|
|
13
|
+
#import "PDFJSIManager.h"
|
|
13
14
|
|
|
15
|
+
#if __has_include(<React/RCTLog.h>)
|
|
16
|
+
#import <React/RCTLog.h>
|
|
17
|
+
#else
|
|
18
|
+
#import "RCTLog.h"
|
|
19
|
+
#endif
|
|
14
20
|
|
|
15
21
|
@implementation RNPDFPdfViewManager
|
|
16
22
|
|
|
@@ -57,6 +63,193 @@ RCT_EXPORT_METHOD(supportPDFKit:(RCTResponseSenderBlock)callback)
|
|
|
57
63
|
|
|
58
64
|
}
|
|
59
65
|
|
|
66
|
+
// CRITICAL: Export JSI availability check method
|
|
67
|
+
RCT_EXPORT_METHOD(checkJSIAvailability:(RCTPromiseResolveBlock)resolve
|
|
68
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
69
|
+
{
|
|
70
|
+
@try {
|
|
71
|
+
RCTLogInfo(@"📱 RNPDFPdfViewManager: Checking JSI availability");
|
|
72
|
+
|
|
73
|
+
// Check if PDFJSIManager is available
|
|
74
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
75
|
+
|
|
76
|
+
if (jsiManager) {
|
|
77
|
+
RCTLogInfo(@"✅ RNPDFPdfViewManager: JSI Manager found - JSI is AVAILABLE");
|
|
78
|
+
resolve(@{
|
|
79
|
+
@"available": @YES,
|
|
80
|
+
@"message": @"JSI is available via PDFJSIManager",
|
|
81
|
+
@"platform": @"ios"
|
|
82
|
+
});
|
|
83
|
+
} else {
|
|
84
|
+
RCTLogWarn(@"⚠️ RNPDFPdfViewManager: JSI Manager not found - falling back to bridge mode");
|
|
85
|
+
resolve(@{
|
|
86
|
+
@"available": @NO,
|
|
87
|
+
@"message": @"JSI not available, using bridge mode",
|
|
88
|
+
@"platform": @"ios"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
} @catch (NSException *exception) {
|
|
93
|
+
RCTLogError(@"❌ RNPDFPdfViewManager: Error checking JSI availability: %@", exception.reason);
|
|
94
|
+
reject(@"JSI_CHECK_ERROR", exception.reason, nil);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Forward JSI methods to PDFJSIManager
|
|
99
|
+
RCT_EXPORT_METHOD(renderPageDirect:(NSString *)pdfId
|
|
100
|
+
pageNumber:(NSInteger)pageNumber
|
|
101
|
+
scale:(double)scale
|
|
102
|
+
base64Data:(NSString *)base64Data
|
|
103
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
104
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
105
|
+
{
|
|
106
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
107
|
+
if (jsiManager) {
|
|
108
|
+
[jsiManager renderPageDirect:pdfId pageNumber:pageNumber scale:scale base64Data:base64Data resolver:resolve rejecter:reject];
|
|
109
|
+
} else {
|
|
110
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
RCT_EXPORT_METHOD(getPageMetrics:(NSString *)pdfId
|
|
115
|
+
pageNumber:(NSInteger)pageNumber
|
|
116
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
117
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
118
|
+
{
|
|
119
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
120
|
+
if (jsiManager) {
|
|
121
|
+
[jsiManager getPageMetrics:pdfId pageNumber:pageNumber resolver:resolve rejecter:reject];
|
|
122
|
+
} else {
|
|
123
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
RCT_EXPORT_METHOD(preloadPagesDirect:(NSString *)pdfId
|
|
128
|
+
startPage:(NSInteger)startPage
|
|
129
|
+
endPage:(NSInteger)endPage
|
|
130
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
131
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
132
|
+
{
|
|
133
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
134
|
+
if (jsiManager) {
|
|
135
|
+
[jsiManager preloadPagesDirect:pdfId startPage:startPage endPage:endPage resolver:resolve rejecter:reject];
|
|
136
|
+
} else {
|
|
137
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
RCT_EXPORT_METHOD(getCacheMetrics:(RCTPromiseResolveBlock)resolve
|
|
142
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
143
|
+
{
|
|
144
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
145
|
+
if (jsiManager) {
|
|
146
|
+
[jsiManager getCacheMetrics:@"default" resolver:resolve rejecter:reject];
|
|
147
|
+
} else {
|
|
148
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
RCT_EXPORT_METHOD(clearCacheDirect:(NSString *)pdfId
|
|
153
|
+
cacheType:(NSString *)cacheType
|
|
154
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
155
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
156
|
+
{
|
|
157
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
158
|
+
if (jsiManager) {
|
|
159
|
+
[jsiManager clearCacheDirect:pdfId cacheType:cacheType resolver:resolve rejecter:reject];
|
|
160
|
+
} else {
|
|
161
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
RCT_EXPORT_METHOD(optimizeMemory:(NSString *)pdfId
|
|
166
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
167
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
168
|
+
{
|
|
169
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
170
|
+
if (jsiManager) {
|
|
171
|
+
[jsiManager optimizeMemory:pdfId resolver:resolve rejecter:reject];
|
|
172
|
+
} else {
|
|
173
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
RCT_EXPORT_METHOD(searchTextDirect:(NSString *)pdfId
|
|
178
|
+
searchTerm:(NSString *)searchTerm
|
|
179
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
180
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
181
|
+
{
|
|
182
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
183
|
+
if (jsiManager) {
|
|
184
|
+
[jsiManager searchTextDirect:pdfId searchTerm:searchTerm startPage:1 endPage:999 resolver:resolve rejecter:reject];
|
|
185
|
+
} else {
|
|
186
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
RCT_EXPORT_METHOD(getPerformanceMetricsDirect:(NSString *)pdfId
|
|
191
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
192
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
193
|
+
{
|
|
194
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
195
|
+
if (jsiManager) {
|
|
196
|
+
[jsiManager getPerformanceMetrics:pdfId resolver:resolve rejecter:reject];
|
|
197
|
+
} else {
|
|
198
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
RCT_EXPORT_METHOD(setRenderQuality:(NSString *)pdfId
|
|
203
|
+
quality:(NSInteger)quality
|
|
204
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
205
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
206
|
+
{
|
|
207
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
208
|
+
if (jsiManager) {
|
|
209
|
+
[jsiManager setRenderQuality:pdfId quality:quality resolver:resolve rejecter:reject];
|
|
210
|
+
} else {
|
|
211
|
+
reject(@"JSI_NOT_AVAILABLE", @"PDFJSIManager not available", nil);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
RCT_EXPORT_METHOD(getJSIStats:(RCTPromiseResolveBlock)resolve
|
|
216
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
217
|
+
{
|
|
218
|
+
@try {
|
|
219
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
220
|
+
|
|
221
|
+
NSDictionary *stats = @{
|
|
222
|
+
@"jsiAvailable": jsiManager ? @YES : @NO,
|
|
223
|
+
@"platform": @"ios",
|
|
224
|
+
@"version": @"2.2.5",
|
|
225
|
+
@"message": jsiManager ? @"JSI stats available" : @"JSI not available"
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
resolve(stats);
|
|
229
|
+
|
|
230
|
+
} @catch (NSException *exception) {
|
|
231
|
+
reject(@"JSI_STATS_ERROR", exception.reason, nil);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
RCT_EXPORT_METHOD(check16KBSupport:(RCTPromiseResolveBlock)resolve
|
|
236
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
237
|
+
{
|
|
238
|
+
PDFJSIManager *jsiManager = [self.bridge moduleForClass:[PDFJSIManager class]];
|
|
239
|
+
if (jsiManager) {
|
|
240
|
+
[jsiManager check16KBSupport:resolve rejecter:reject];
|
|
241
|
+
} else {
|
|
242
|
+
// Fallback response for iOS
|
|
243
|
+
resolve(@{
|
|
244
|
+
@"supported": @YES,
|
|
245
|
+
@"platform": @"ios",
|
|
246
|
+
@"message": @"iOS is compatible with 16KB page size requirements",
|
|
247
|
+
@"googlePlayCompliant": @YES,
|
|
248
|
+
@"iosCompatible": @YES
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
60
253
|
+ (BOOL)requiresMainQueueSetup {
|
|
61
254
|
return YES;
|
|
62
255
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-pdf-jsi",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"summary": "High-performance React Native PDF viewer with JSI acceleration - up to 80x faster than traditional bridge",
|
|
5
5
|
"description": "🚀 Ultra-fast React Native PDF viewer with JSI (JavaScript Interface) integration for maximum performance. Features lazy loading, smart caching, progressive loading, and zero-bridge overhead operations. Perfect for large PDF files with 30-day persistent cache and advanced memory optimization. Google Play 16KB page size compliant for Android 15+. Supports iOS, Android, and Windows platforms.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"PdfView.js",
|
|
91
91
|
"PdfViewFlatList.js",
|
|
92
92
|
"PinchZoomView.js",
|
|
93
|
-
"react-native-pdf.podspec",
|
|
93
|
+
"react-native-pdf-jsi.podspec",
|
|
94
94
|
"fabric/",
|
|
95
95
|
"README_JSI.md",
|
|
96
96
|
"INTEGRATION_GUIDE.md"
|
|
@@ -101,6 +101,9 @@
|
|
|
101
101
|
"jsSrcsDir": "./fabric",
|
|
102
102
|
"android": {
|
|
103
103
|
"javaPackageName": "org.wonday.pdf"
|
|
104
|
+
},
|
|
105
|
+
"ios": {
|
|
106
|
+
"componentProvider": "RNPDFPdfView"
|
|
104
107
|
}
|
|
105
108
|
}
|
|
106
109
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
require 'json'
|
|
3
|
+
|
|
4
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json'), encoding: 'utf-8'))
|
|
5
|
+
|
|
6
|
+
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
7
|
+
|
|
8
|
+
Pod::Spec.new do |s|
|
|
9
|
+
s.name = package['name']
|
|
10
|
+
s.version = package['version']
|
|
11
|
+
s.summary = package['summary']
|
|
12
|
+
s.description = package['description']
|
|
13
|
+
s.author = { package['author']['name'] => package['author']['email'] }
|
|
14
|
+
s.license = package['license']
|
|
15
|
+
s.homepage = package['homepage']
|
|
16
|
+
s.source = { :git => 'https://github.com/126punith/react-native-pdf-enhanced.git', :tag => "v#{s.version}" }
|
|
17
|
+
s.requires_arc = true
|
|
18
|
+
s.framework = "PDFKit"
|
|
19
|
+
|
|
20
|
+
if fabric_enabled
|
|
21
|
+
s.platforms = { ios: '11.0', tvos: '11.0' }
|
|
22
|
+
s.source_files = 'ios/**/*.{h,m,mm,cpp}'
|
|
23
|
+
s.requires_arc = true
|
|
24
|
+
install_modules_dependencies(s)
|
|
25
|
+
|
|
26
|
+
else
|
|
27
|
+
s.platform = :ios, '8.0'
|
|
28
|
+
s.source_files = 'ios/**/*.{h,m,mm}'
|
|
29
|
+
s.dependency 'React-Core'
|
|
30
|
+
end
|
|
31
|
+
end
|