File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ The [PSPDFKit SDK](https://pspdfkit.com/) is a framework that allows you to view
1919
2020#### Requirements
2121
22- - Xcode 9.4
23- - PSPDFKit 7.6 for iOS or later
22+ - Xcode 9.4.1
23+ - PSPDFKit 7.6.1 for iOS or later
2424- react-native >= 0.55.4
2525
2626#### Getting Started
Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ + (PSPDFDocument *)PSPDFDocument:(NSString *)string {
2020 url = [NSBundle .mainBundle URLForResource: string withExtension: nil ];
2121 }
2222
23- return [[PSPDFDocument alloc ] initWithURL: url];
23+ NSString *fileExtension = url.pathExtension .lowercaseString ;
24+ BOOL isImageFile = [fileExtension isEqualToString: @" png" ] || [fileExtension isEqualToString: @" jpeg" ] || [fileExtension isEqualToString: @" jpg" ];
25+ if (isImageFile) {
26+ return [[PSPDFImageDocument alloc ] initWithImageURL: url];
27+ } else {
28+ return [[PSPDFDocument alloc ] initWithURL: url];
29+ }
2430}
2531
2632@end
Original file line number Diff line number Diff line change 33### CocoaPods integration
44
55#### Requirements
6- - Xcode 9
7- - PSPDFKit >=7.0.2
8- - react-native >= 0.48 .4
9- - CocoaPods >= 1.3.1
6+ - Xcode 9.4.1
7+ - PSPDFKit 7.6.1 for iOS or later
8+ - react-native >= 0.55 .4
9+ - CocoaPods >= 1.5.3
1010
1111#### Getting Started
1212
@@ -19,7 +19,7 @@ Lets create a simple app that integrates PSPDFKit using CocoaPods.
19195 . IMPORTANT: Do not link module react-native-pspdfkit: Do not use react-native link react-native-pspdfkit
20206 . Create the folder ` ios/PSPDFKit ` and copy ` PSPDFKit.framework ` and ` PSPDFKitUI.framework ` into it.
21217 . Open ios/YourApp.xcodeproj in Xcode: open ios/YourApp.xcodeproj
22- 8 . Make sure the deployment target is set to 9 .0 or higher:
22+ 8 . Make sure the deployment target is set to 10 .0 or higher:
2323![ Deployment Target] ( ../screenshots/deployment-target.png )
24249 . Change "View controller-based status bar appearance" to YES in Info.plist:
2525 deployment-target.png
You can’t perform that action at this time.
0 commit comments