Skip to content

Commit d79cb3a

Browse files
authored
Merge pull request #381 from PSPDFKit/simone/fix-example-readme
Update README.md
2 parents 4b79418 + 623770e commit d79cb3a

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,20 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
382382
3. Step into your newly created app folder: `cd YourApp`.
383383
4. Add `react-native-pspdfkit` module from GitHub: `yarn add github:PSPDFKit/react-native`.
384384
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.)
385-
6. PSPDFKit targets modern platforms, so you'll have to set the `minSdkVersion` to 19. In `YourApp/android/build.gradle`:
385+
6. Add PSPDFKit repository to `YourApp/android/build.gradle` so PSPDFKit library can be downloaded:
386+
387+
```diff
388+
...
389+
allprojects {
390+
repositories {
391+
mavenLocal()
392+
+ maven {
393+
+ url 'https://customers.pspdfkit.com/maven/'
394+
+ }
395+
...
396+
```
397+
398+
7. PSPDFKit targets modern platforms, so you'll have to set the `minSdkVersion` to 19. In `YourApp/android/build.gradle`:
386399

387400
```diff
388401
...
@@ -397,7 +410,7 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
397410
...
398411
```
399412

400-
7. We will also need to enable MultiDex support. In `YourApp/android/app/build.gradle`:
413+
8. We will also need to enable MultiDex support. In `YourApp/android/app/build.gradle`:
401414

402415
```diff
403416
...
@@ -412,7 +425,7 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
412425
...
413426
```
414427

415-
8. <a id="step-10"></a>Enter your PSPDFKit license key into `YourApp/android/app/src/main/AndroidManifest.xml` file:
428+
9. <a id="step-9"></a>Enter your PSPDFKit license key into `YourApp/android/app/src/main/AndroidManifest.xml` file:
416429

417430
```diff
418431
<application>
@@ -425,7 +438,7 @@ Let's create a simple app that integrates PSPDFKit and uses the react-native-psp
425438
</application>
426439
```
427440

428-
9. Set primary color. In `YourApp/android/app/src/main/res/values/styles.xml` replace
441+
10. Set primary color. In `YourApp/android/app/src/main/res/values/styles.xml` replace
429442

430443
```xml
431444
<!-- Customize your theme here. -->
@@ -437,7 +450,7 @@ with
437450
<item name="colorPrimary">#3C97C9</item>
438451
```
439452

440-
10. <a id="step-12"></a>Replace the default component from `YourApp/App.js` with a simple touch area to present a PDF document from the local device filesystem:
453+
11. <a id="step-11"></a>Replace the default component from `YourApp/App.js` with a simple touch area to present a PDF document from the local device filesystem:
441454

442455
```javascript
443456
import React, { Component } from "react";
@@ -508,13 +521,13 @@ const styles = StyleSheet.create({
508521
});
509522
```
510523

511-
11. Before launching the app you need to copy a PDF document onto your development device or emulator.
524+
12. Before launching the app you need to copy a PDF document onto your development device or emulator.
512525

513526
```bash
514527
adb push /path/to/your/document.pdf /sdcard/document.pdf
515528
```
516529

517-
12. Your app is now ready to launch. From `YourApp` directory run `react-native run-android`.
530+
13. Your app is now ready to launch. From `YourApp` directory run `react-native run-android`.
518531

519532
```bash
520533
react-native run-android

0 commit comments

Comments
 (0)