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
Let's create a simple app that integrates `pspdfkit-*.aar` and uses the react-native-pspdfkit module.
119
+
Let's create a simple app that integrates PSPDFKit and uses the react-native-pspdfkit module.
120
120
121
121
1. Make sure `react-native-cli` is installed: `yarn global add react-native-cli`
122
122
2. Create the app with `react-native init YourApp`.
123
123
3. Step into your newly created app folder: `cd YourApp`.
124
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`.
127
-
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`.
129
-
For PSPDFKit 2.9.3 :
130
-
131
-
```
132
-
dependencies {
133
-
...
134
-
//compile 'com.pspdfkit:pspdfkit:2.9.3@aar' <-- DO NOT ADD THE LIBRARY ITSELF
10. Copy `pspdfkit-*.aar` library in `YourApp/android/pspdfkit-lib`.
162
-
11. Add the following dependencies to `YourApp/android/app/build.gradle` file:
163
-
164
-
```
165
-
dependencies {
166
-
...
167
-
compile project(':pspdfkit-lib')
168
-
}
169
-
```
170
-
171
-
And modify the following lines (note **three** places to edit):
149
+
7. PSPDFKit targets modern platforms, so you'll have to update `compileSdkVersion` and `targetSdkVersion` to at least API 25 (note **three** places to edit):
15. Your app is now ready to launch. From `YourApp` directory run `react-native run-android`.
275
+
12. Your app is now ready to launch. From `YourApp` directory run `react-native run-android`.
286
276
287
277
```bash
288
278
react-native run-android
@@ -291,28 +281,33 @@ with
291
281
#### Running Catalog Project
292
282
293
283
1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`.
294
-
2. Add dependencies to `android/build.gradle` (not `samples/Catalog/android/build.gradle`).
295
-
296
-
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`.
297
-
For PSPDFKit 2.9.3 :
298
-
299
-
```
300
-
dependencies {
301
-
...
302
-
//compile 'com.pspdfkit:pspdfkit:2.9.3@aar'<-- DO NOT ADD THE LIBRARY ITSELF
2. Install dependencies: run `yarn install` from `samples/Catalog` directory. (Because of a [bug](https://github.com/yarnpkg/yarn/issues/2165) you may need to clean `yarn`'s cache with `yarn cache clean` before.)
285
+
3. Add your customer portal password to `samples/Catalog/build.gradle`:
286
+
287
+
```groovy
288
+
maven {
289
+
url 'https://customers.pspdfkit.com/maven/'
290
+
291
+
credentials {
292
+
username 'pspdfkit'
293
+
password 'YOUR_MAVEN_PASSWORD_GOES_HERE'
294
+
}
295
+
}
296
+
```
297
+
298
+
4. Update license key in `samples/Catalog/android/app/src/main/AndroidManifest.xml`:
4. Install dependencies: run `yarn install` from `samples/Catalog` directory. (Because of a [bug](https://github.com/yarnpkg/yarn/issues/2165) you may need to clean `yarn`'s cache with `yarn cache clean` before.)
316
311
5. Catalog app is now ready to launch. From `samples/Catalog` directory run `react-native run-android`.
0 commit comments