Skip to content

Commit b4ab111

Browse files
committed
Update React Native catalog app
1 parent 71a3fb8 commit b4ab111

File tree

5 files changed

+40
-26
lines changed

5 files changed

+40
-26
lines changed

README.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -268,28 +268,33 @@ with
268268
#### Running Catalog Project
269269

270270
1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`.
271-
2. Add dependencies to `android/build.gradle` (not `samples/Catalog/android/build.gradle`).
272-
273-
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`.
274-
For PSPDFKit 2.9.3 :
275-
276-
```
277-
dependencies {
278-
...
279-
//compile 'com.pspdfkit:pspdfkit:2.9.3@aar' <-- DO NOT ADD THE LIBRARY ITSELF
280-
compile 'com.android.support:support-v4:25.1.+'
281-
compile 'com.android.support:appcompat-v7:25.1.+'
282-
compile "com.android.support:recyclerview-v7:25.1.+"
283-
compile "com.android.support:cardview-v7:25.1.+"
284-
compile "com.android.support:design:25.1.+"
285-
compile 'io.reactivex:rxjava:1.2.6'
286-
compile 'io.reactivex:rxandroid:1.2.1'
287-
compile 'com.getkeepsafe.relinker:relinker:1.2.2'
288-
}
271+
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.)
272+
3. Add your customer portal password to `samples/Catalog/build.gradle`:
273+
274+
```groovy
275+
maven {
276+
url 'https://customers.pspdfkit.com/maven/'
277+
278+
credentials {
279+
username 'pspdfkit'
280+
password 'YOUR_MAVEN_PASSWORD_GOES_HERE'
281+
}
282+
}
283+
```
284+
285+
4. Update license key in `samples/Catalog/android/app/src/main/AndroidManifest.xml`:
286+
287+
```xml
288+
<application>
289+
...
290+
291+
<meta-data
292+
android:name="pspdfkit_license_key"
293+
android:value="YOUR_LICENSE_KEY_GOES_HERE"/>
294+
295+
</application>
289296
```
290297
291-
3. Copy `pspdfkit-*.aar` library in `samples/Catalog/android/pspdfkit-lib`.
292-
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.)
293298
5. Catalog app is now ready to launch. From `samples/Catalog` directory run `react-native run-android`.
294299
295300
#### Configuration

samples/Catalog/android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
</intent-filter>
2727
</activity>
2828
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
29+
30+
<meta-data
31+
android:name="pspdfkit_license_key"
32+
android:value="YOUR_LICENSE_KEY_GOES_HERE"/>
2933
</application>
3034

3135
</manifest>

samples/Catalog/android/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
8+
classpath 'com.android.tools.build:gradle:2.3.0'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
@@ -16,6 +16,14 @@ allprojects {
1616
repositories {
1717
mavenLocal()
1818
jcenter()
19+
maven {
20+
url 'https://customers.pspdfkit.com/maven/'
21+
22+
credentials {
23+
username 'pspdfkit'
24+
password 'YOUR_MAVEN_KEY_GOES_HERE'
25+
}
26+
}
1927
maven {
2028
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
2129
url "$rootDir/../node_modules/react-native/android"

samples/Catalog/android/pspdfkit-lib/build.gradle

Lines changed: 0 additions & 3 deletions
This file was deleted.

samples/Catalog/yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,13 +1847,13 @@ mime-db@~1.23.0:
18471847
version "1.23.0"
18481848
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.23.0.tgz#a31b4070adaea27d732ea333740a64d0ec9a6659"
18491849

1850-
[email protected], mime-types@~2.1.7:
1850+
[email protected], mime-types@~2.1.7, mime-types@~2.1.9:
18511851
version "2.1.11"
18521852
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.11.tgz#c259c471bda808a85d6cd193b430a5fae4473b3c"
18531853
dependencies:
18541854
mime-db "~1.23.0"
18551855

1856-
mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.13, mime-types@~2.1.6, mime-types@~2.1.9:
1856+
mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.13, mime-types@~2.1.6:
18571857
version "2.1.14"
18581858
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee"
18591859
dependencies:

0 commit comments

Comments
 (0)