Skip to content

Commit 60bdcec

Browse files
authored
Merge pull request #73 from PSPDFKit/rad/update-for-7.6-ios
Update for PSPDFKit 7.6 for iOS
2 parents c60c144 + 971627a commit 60bdcec

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ The [PSPDFKit SDK](https://pspdfkit.com/) is a framework that allows you to view
1919

2020
#### Requirements
2121

22-
- Xcode 9.3
23-
- PSPDFKit 7 for iOS
24-
- react-native >= 0.48.4
22+
- Xcode 9.4
23+
- PSPDFKit 7.6 for iOS or later
24+
- react-native >= 0.55.4
2525

2626
#### Getting Started
2727

@@ -33,28 +33,29 @@ Let's create a simple app that integrates PSPDFKit and uses the `react-native-ps
3333
2. Create the app with `react-native init YourApp`.
3434
3. Step into your newly created app folder: `cd YourApp`
3535
4. Install `react-native-pspdfkit` from GitHub: `yarn add github:PSPDFKit/react-native`
36-
5. Link module `react-native-pspdfkit`: `react-native link react-native-pspdfkit`
37-
6. Create the folder `ios/PSPDFKit` and copy `PSPDFKit.framework` and `PSPDFKitUI.framework` into it.
38-
7. Open `ios/YourApp.xcodeproj` in Xcode: `open ios/YourApp.xcodeproj`
39-
8. Make sure the deployment target is set to 9.0 or higher:
36+
5. Install all the dependencies for the project: `yarn install`. (Because of a [bug](https://github.com/yarnpkg/yarn/issues/2165) you may need to clean `yarn`'s cache with `yarn cache clean` before.)
37+
6. Link module `react-native-pspdfkit`: `react-native link react-native-pspdfkit`.
38+
7. Create the folder `ios/PSPDFKit` and copy `PSPDFKit.framework` and `PSPDFKitUI.framework` into it.
39+
8. Open `ios/YourApp.xcodeproj` in Xcode: `open ios/YourApp.xcodeproj`
40+
9. Make sure the deployment target is set to 10.0 or higher:
4041
![Deployment Target](screenshots/deployment-target.png)
41-
9. Change "View controller-based status bar appearance" to `YES` in `Info.plist`:
42+
10. Change "View controller-based status bar appearance" to `YES` in `Info.plist`:
4243
![View Controller-Based Status Bar Appearance](screenshots/view-controller-based-status-bar-appearance.png)
43-
10. Link with the `libRCTPSPDFKit.a` static library (if `libRCTPSPDFKit.a` is already there but greyed out, delete it and link it again):
44+
11. Link with the `libRCTPSPDFKit.a` static library (if `libRCTPSPDFKit.a` is already there but greyed out, delete it and link it again):
4445
![Linking Static Library](screenshots/linking-static-library.png)
45-
11. Embed `PSPDFKit.framework` and `PSPDFKitUI.framework` by drag and dropping it into the "Embedded Binaries" section of the "YourApp" target (Select "Create groups"). This will also add it to the "Linked Framworks and Libraries" section:
46+
12. Embed `PSPDFKit.framework` and `PSPDFKitUI.framework` by drag and dropping it into the "Embedded Binaries" section of the "YourApp" target (Select "Create groups"). This will also add it to the "Linked Framworks and Libraries" section:
4647
![Embedding PSPDFKit](screenshots/embedding-pspdfkit.png)
47-
12. Add a new `Run Script Phase` in your target’s `Build Phases`.
48+
13. Add a new `Run Script Phase` in your target’s `Build Phases`.
4849
**IMPORTANT:** Make sure this `Run Script Phase` is below the `Embed Frameworks` build phase.
4950
You can drag and drop build phases to rearrange them.
5051
Paste the following line in the script text field of `Run Script Phase`:
5152
```sh
5253
bash "$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/PSPDFKit.framework/strip-framework.sh"
5354
```
5455
![Run Script Phase](screenshots/run-script-phase.png)
55-
13. Add a PDF by drag and dropping it into your Xcode project (Select "Create groups" and add to target "YourApp"). This will add the document to the "Copy Bundle Resources" build phase:
56+
14. Add a PDF by drag and dropping it into your Xcode project (Select "Create groups" and add to target "YourApp"). This will add the document to the "Copy Bundle Resources" build phase:
5657
![Adding PDF](screenshots/adding-pdf.png)
57-
14. Replace the default component from `App.js` with a simple touch area to present the bundled PDF. (Note that you can also use a [Native UI Component](#native-ui-component) to show a PDF.)
58+
15. Replace the default component from `App.js` with a simple touch area to present the bundled PDF. (Note that you can also use a [Native UI Component](#native-ui-component) to show a PDF.)
5859

5960
```javascript
6061
import React, { Component } from 'react';

screenshots/deployment-target.png

-91.2 KB
Loading

0 commit comments

Comments
 (0)