You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve indentation for index.android.js example file.
* Link react-native-pspdfkit module.
* Installations steps for Android streamlined using automatic linking.
11. Embed `PSPDFKit.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:
29
+
12. Embed `PSPDFKit.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:
12. 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:
31
+
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:
31
32

32
-
13. Replace the default component from `index.ios.js` with a simple touch area to present the bundled PDF:
33
+
14. Replace the default component from `index.ios.js` with a simple touch area to present the bundled PDF:
33
34
34
35
```javascript
35
36
importReact, { Component } from'react';
@@ -120,8 +121,9 @@ Let's create a simple app that integrates `pspdfkit-*.aar` and uses the react-na
120
121
1. Make sure `react-native-cli` is installed: `yarn global add react-native-cli`
121
122
2. Create the app with `react-native init YourApp`.
122
123
3. Step into your newly created app folder: `cd YourApp`.
123
-
4. Install `react-native-pspdfkit` from GitHub: `react-native install github:PSPDFKit/react-native`.
124
-
5. Add dependencies to `YourApp/node_modules/react-native-pspdfkit/android/build.gradle`.
124
+
4. Install `react-native-pspdfkit` from GitHub: `yarn add github:PSPDFKit/react-native`.
125
+
5. Link module `react-native-pspdfkit`: `react-native link react-native-pspdfkit`.
126
+
6. Add dependencies to `YourApp/node_modules/react-native-pspdfkit/android/build.gradle`.
125
127
126
128
A complete list of the dependencies needed can be found in the [documentation](https://pspdfkit.com/guides/android/current/getting-started/integrating-pspdfkit/#toc_manual-library-file-integration) step 6, under `Manual library file integration`.
127
129
For PSPDFKit 2.9.3 :
@@ -141,30 +143,27 @@ dependencies {
141
143
}
142
144
```
143
145
144
-
6. Add the following lines to `YourApp/android/settings.gradle` file:
146
+
7. Add the following lines to `YourApp/android/settings.gradle` file:
145
147
146
148
```
147
149
include ':pspdfkit-lib'
148
-
include ':react-native-pspdfkit'
149
-
project(':react-native-pspdfkit').projectDir = new File(settingsDir, '../node_modules/react-native-pspdfkit/android')
150
150
```
151
151
152
-
7. Create new `pspdfkit-lib` folder in `YourApp/android`.
153
-
8. Create new `build.gradle` file in `YourApp/android/pspdfkit-lib` and add the following lines:
152
+
8. Create new `pspdfkit-lib` folder in `YourApp/android`.
153
+
9. Create new `build.gradle` file in `YourApp/android/pspdfkit-lib` and add the following lines:
0 commit comments