Skip to content

Commit f319489

Browse files
authored
Update README.md
1 parent ca1fc2e commit f319489

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,10 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
257257
1. Make sure `react-native-cli` is installed: `yarn global add react-native-cli`
258258
2. Create the app with `react-native init YourApp`.
259259
3. Step into your newly created app folder: `cd YourApp`.
260-
4. Install `react-native-pspdfkit` from GitHub: `yarn add github:PSPDFKit/react-native`.
261-
5. Link module `react-native-pspdfkit`: `react-native link react-native-pspdfkit`.
262-
6. <a id="step-6"></a>Add PSPDFKit and Google repository to `YourApp/android/build.gradle` so PSPDFKit library and Android dependencies can be downloaded:
260+
4. Add `react-native-pspdfkit` module from GitHub: `yarn add github:PSPDFKit/react-native`.
261+
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.)
262+
6. Link module `react-native-pspdfkit`: `react-native link react-native-pspdfkit`.
263+
7. <a id="step-6"></a>Add PSPDFKit and Google repository to `YourApp/android/build.gradle` so PSPDFKit library and Android dependencies can be downloaded:
263264

264265
```diff
265266
allprojects {
@@ -285,7 +286,7 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
285286
}
286287
```
287288

288-
7. PSPDFKit targets modern platforms, so you'll have to update `compileSdkVersion` and `targetSdkVersion` to at least API 26 and enable MultiDex. In `YourApp/android/app/build.gradle` (note **five** places to edit):
289+
8. PSPDFKit targets modern platforms, so you'll have to update `compileSdkVersion` and `targetSdkVersion` to at least API 26 and enable MultiDex. In `YourApp/android/app/build.gradle` (note **five** places to edit):
289290

290291
```diff
291292
...
@@ -311,7 +312,7 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
311312
...
312313
```
313314
314-
8. <a id="step-8"></a>Enter your PSPDFKit license key into `YourApp/android/app/src/main/AndroidManifest.xml` file:
315+
9. <a id="step-8"></a>Enter your PSPDFKit license key into `YourApp/android/app/src/main/AndroidManifest.xml` file:
315316

316317
```diff
317318
<application>
@@ -324,15 +325,15 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
324325
</application>
325326
```
326327

327-
9. Set primary color. In `YourApp/android/app/src/main/res/values/styles.xml` replace
328+
10. Set primary color. In `YourApp/android/app/src/main/res/values/styles.xml` replace
328329
```xml
329330
<!-- Customize your theme here. -->
330331
```
331332
with
332333
```xml
333334
<item name="colorPrimary">#3C97C9</item>
334335
```
335-
10. <a id="step-10"></a>Replace the default component from `YourApp/App.js` with a simple touch area to present a PDF document from the local device filesystem:
336+
11. <a id="step-10"></a>Replace the default component from `YourApp/App.js` with a simple touch area to present a PDF document from the local device filesystem:
336337

337338
```javascript
338339
import React, { Component } from 'react';
@@ -403,13 +404,13 @@ with
403404
}
404405
});
405406
```
406-
11. Before launching the app you need to copy a PDF document onto your development device or emulator.
407+
12. Before launching the app you need to copy a PDF document onto your development device or emulator.
407408

408409
```bash
409410
adb push /path/to/your/document.pdf /sdcard/document.pdf
410411
```
411412

412-
12. Your app is now ready to launch. From `YourApp` directory run `react-native run-android`.
413+
13. Your app is now ready to launch. From `YourApp` directory run `react-native run-android`.
413414

414415
```bash
415416
react-native run-android

0 commit comments

Comments
 (0)