Skip to content

Commit 2bdacfd

Browse files
authoredJul 7, 2021
Update for PSPDFKit 10.5 for iOS (#409)
* Update for PSPDFKit 10.5 for iOS * Bump version number to 1.31.5 * Fix link
1 parent 227b83a commit 2bdacfd

File tree

16 files changed

+64
-55
lines changed

16 files changed

+64
-55
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ yarn add github:PSPDFKit/react-native
7777
yarn install
7878
```
7979

80-
6. Open your project’s Podfile in a text editor to update the platform to iOS 12, and add the PSPDFKit Podspec:
80+
6. Open your project’s Podfile in a text editor to update the platform to iOS 13, and add the PSPDFKit Podspec:
8181

8282
```bash
8383
open ios/Podfile
@@ -90,7 +90,7 @@ require_relative '../node_modules/react-native/scripts/react_native_pods'
9090
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
9191

9292
- platform :ios, '10.0'
93-
+ platform :ios, '12.0'
93+
+ platform :ios, '13.0'
9494

9595
target 'PSPDFKitDemo' do
9696
config = use_native_modules!
@@ -137,7 +137,7 @@ pod install
137137
open PSPDFKitDemo.xcworkspace
138138
```
139139

140-
7. Make sure the deployment target is set to 12.0 or higher:
140+
7. Make sure the deployment target is set to 13.0 or higher:
141141

142142
![deployment-target](/screenshots/deployment-target.png)
143143

‎ios/RCTPSPDFKit.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
"$(SRCROOT)/../../react-native/React/**",
288288
"$(SRCROOT)/../samples/Catalog/node_modules/react-native/React/**",
289289
);
290-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
290+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
291291
MTL_ENABLE_DEBUG_INFO = YES;
292292
ONLY_ACTIVE_ARCH = YES;
293293
SDKROOT = iphoneos;
@@ -346,7 +346,7 @@
346346
"$(SRCROOT)/../../react-native/React/**",
347347
"$(SRCROOT)/../samples/Catalog/node_modules/react-native/React/**",
348348
);
349-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
349+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
350350
MTL_ENABLE_DEBUG_INFO = NO;
351351
SDKROOT = iphoneos;
352352
VALIDATE_PRODUCT = YES;

‎ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m

-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ - (void)setupFromJSON:(id)json {
338338
SET(createAnnotationMenuEnabled, BOOL)
339339
SET(naturalDrawingAnnotationEnabled, BOOL)
340340
SET(drawCreateMode, PSPDFDrawCreateMode)
341-
SET(showAnnotationMenuAfterCreation, BOOL)
342341
SET(shouldAskForAnnotationUsername, BOOL)
343342
SET(annotationEntersEditModeAfterSecondTapEnabled, BOOL)
344343
SET(autosaveEnabled, BOOL)

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-pspdfkit",
3-
"version": "1.31.4",
3+
"version": "1.31.5",
44
"description": "A React Native module for the PSPDFKit library.",
55
"keywords": [
66
"react native",

‎react-native-pspdfkit.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
99
s.authors = ["PSPDFKit"]
1010
s.homepage = "https://github.com/PSPDFKit/react-native#readme"
1111
s.license = package['license']
12-
s.platform = :ios, "11.0"
12+
s.platform = :ios, "13.0"
1313
s.module_name = 'PSPDFKitReactNativeiOS'
1414
s.source = { :git => "https://github.com/PSPDFKit/react-native" }
1515
s.source_files = "ios/*.{xcodeproj}", "ios/RCTPSPDFKit/*.{h,m,swift}", "ios/RCTPSPDFKit/Converters/*.{h,m,swift}"

‎samples/Catalog/README.md

+19-27
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,19 @@ The project contains a large set of sample code, which illustrates how to set up
66

77
#### Requirements
88

9-
- Android SDK
10-
- Android NDK
11-
- Android Build Tools 23.0.1 (React Native)
12-
- Android Build Tools 28.0.3 (PSPDFKit module)
13-
- Android Gradle plugin 3.4.1 or later.
14-
- PSPDFKit for Android 6.6.0 or later.
9+
- The [latest stable version of Android Studio](https://developer.android.com/studio).
10+
- The [Android NDK](https://developer.android.com/studio/projects/install-ndk).
11+
- An [Android Virtual Device](Android Virtual Device) or a hardware device.
1512
- React Native 0.60.4.
1613

1714
#### Getting Started
1815

19-
1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`.
20-
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.)
21-
3. Update license key in `samples/Catalog/android/app/src/main/AndroidManifest.xml`:
22-
23-
```xml
24-
<application>
25-
...
26-
27-
<meta-data
28-
android:name="pspdfkit_license_key"
29-
android:value="YOUR_LICENSE_KEY_GOES_HERE"/>
30-
31-
</application>
32-
```
33-
34-
4. Catalog app is now ready to launch. From `samples/Catalog` directory run `react-native run-android`.
16+
1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`.
17+
2. Step into the Catalog project's directory: `cd react-native/samples/Catalog`
18+
3. Install dependencies: run `yarn install`.
19+
4. [Start your emulator](https://developer.android.com/studio/run/emulator#runningemulator).
20+
5. Start the Metro bundler by running `react-native start`.
21+
6. Catalog app is now ready to launch. From `samples/Catalog` directory run `react-native run-android`.
3522

3623
### Running the Catalog on iOS
3724

@@ -44,10 +31,15 @@ The project contains a large set of sample code, which illustrates how to set up
4431
#### Getting Started
4532

4633
1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`.
47-
2. Step into your newly cloned folder: `cd react-native` and create a new `PSPDFKit` directory: `mkdir PSPDFKit`.
48-
3. [Download the latest version of PSPDFKit for iOS](https://customers.pspdfkit.com/download/binary/ios/latest) and mount the DMG file.
49-
4. Copy `PSPDFKit.xcframework` and `PSPDFKitUI.xcframework` into the `PSPDFKit` directory.
50-
5. Install dependencies: `yarn install` in `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.)
51-
6. Run the app with `react-native-cli`: `react-native run-ios`
34+
2. Step into your newly cloned folder: `cd react-native`
35+
3. Create a new `PSPDFKit` directory: `mkdir PSPDFKit`.
36+
4. [Download the latest version of PSPDFKit for iOS](https://customers.pspdfkit.com/download/binary/ios/latest) and mount the DMG file.
37+
5. Copy `PSPDFKit.xcframework` and `PSPDFKitUI.xcframework` into the `PSPDFKit` directory.
38+
6. Step into the Catalog project's directory: `cd /samples/Catalog`
39+
7. Install dependencies: `yarn install` in `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.)
40+
8. Start the Metro bundler by running `react-native start`
41+
9. Run the app with `react-native-cli`: `react-native run-ios`
42+
43+
### Troubleshooting
5244

5345
**Note:** If you get an error about `config.h` not being found check out [this blog post](https://tuntunir.blogspot.com/2018/02/react-native-fatal-error-configh-file.html) for information on how to fix it.

‎samples/Catalog/ios/Catalog.xcodeproj/project.pbxproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@
11121112
"$(inherited)",
11131113
);
11141114
INFOPLIST_FILE = CatalogTests/Info.plist;
1115-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1115+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
11161116
LD_RUNPATH_SEARCH_PATHS = (
11171117
"$(inherited)",
11181118
"@executable_path/Frameworks",
@@ -1249,7 +1249,7 @@
12491249
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
12501250
"$(SRCROOT)/../node_modules/react-native/React/**",
12511251
);
1252-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1252+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
12531253
MTL_ENABLE_DEBUG_INFO = YES;
12541254
ONLY_ACTIVE_ARCH = YES;
12551255
SDKROOT = iphoneos;
@@ -1301,7 +1301,7 @@
13011301
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
13021302
"$(SRCROOT)/../node_modules/react-native/React/**",
13031303
);
1304-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
1304+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
13051305
MTL_ENABLE_DEBUG_INFO = NO;
13061306
SDKROOT = iphoneos;
13071307
VALIDATE_PRODUCT = YES;

‎samples/Catalog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Catalog",
3-
"version": "1.31.4",
3+
"version": "1.31.5",
44
"private": true,
55
"scripts": {
66
"start": "react-native start",

‎samples/Catalog/yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -5415,7 +5415,7 @@ react-native-permissions@^1.1.1:
54155415
integrity sha512-t0Ujm177bagjUOSzhpmkSz+LqFW04HnY9TeZFavDCmV521fQvFz82aD+POXqWsAdsJVOK3umJYBNNqCjC3g0hQ==
54165416

54175417
"react-native-pspdfkit@file:../..":
5418-
version "1.31.4"
5418+
version "1.31.5"
54195419

54205420
react-native-qrcode-scanner@^1.2.1:
54215421
version "1.2.1"

‎samples/NativeCatalog/README.md

+25-7
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,34 @@ This second Catalog example serves to show you how you can leverage `PdfView` (A
44

55
### Running this Sample on Android
66

7-
1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`.
8-
2. Install dependencies: run `yarn install` from `samples/NativeCatalog` directory.
9-
3. The Native Catalog app is now ready to launch. From `samples/NativeCatalog` directory run `react-native run-android`.
7+
#### Requirements
8+
9+
- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI).
10+
- The [latest stable version of Android Studio](https://developer.android.com/studio).
11+
- The [Android NDK](https://developer.android.com/studio/projects/install-ndk).
12+
- An [Android Virtual Device](Android Virtual Device) or a hardware device.
13+
14+
#### Getting Started
15+
16+
1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`.
17+
2. Step into the NativeCatalog project's directory: `cd react-native/samples/NativeCatalog`.
18+
3. Install dependencies: run `yarn install`.
19+
4. The Native Catalog app is now ready to launch: `react-native run-android`.
1020

1121
### Running this Sample on iOS
1222

13-
1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`.
14-
2. Install dependencies: run `yarn install` from the `samples/NativeCatalog` directory.
15-
3. `cd ios` then run `pod install`.
16-
4. The Native Catalog app is now ready to launch. From `samples/NativeCatalog` directory run `react-native run-ios`.
23+
- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI).
24+
- The [latest stable version of Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12).
25+
- The [latest stable version of CocoaPods](https://github.com/CocoaPods/CocoaPods/releases). If you don’t already have CocoaPods installed, follow the [CocoaPods installation guide](https://guides.cocoapods.org/using/getting-started.html#installation) to install CocoaPods on your Mac.
26+
27+
#### Getting Started
28+
29+
1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`.
30+
2. Step into the `NativeCatalog` project's directory: `cd react-native/samples/NativeCatalog`.
31+
3. Install dependencies: run `yarn install`.
32+
4. `cd ios` then run `pod install`.
33+
5. Step back into the `NativeCatalog` project's directory: `cd ..`.
34+
6. The Native Catalog app is now ready to launch: `react-native run-ios`.
1735

1836
### Examples
1937

‎samples/NativeCatalog/ios/NativeCatalog.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@
468468
"$(inherited)",
469469
);
470470
INFOPLIST_FILE = NativeCatalogTests/Info.plist;
471-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
471+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
472472
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
473473
OTHER_LDFLAGS = (
474474
"-ObjC",
@@ -489,7 +489,7 @@
489489
BUNDLE_LOADER = "$(TEST_HOST)";
490490
COPY_PHASE_STRIP = NO;
491491
INFOPLIST_FILE = NativeCatalogTests/Info.plist;
492-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
492+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
493493
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
494494
OTHER_LDFLAGS = (
495495
"-ObjC",
@@ -602,7 +602,7 @@
602602
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
603603
GCC_WARN_UNUSED_FUNCTION = YES;
604604
GCC_WARN_UNUSED_VARIABLE = YES;
605-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
605+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
606606
MTL_ENABLE_DEBUG_INFO = YES;
607607
ONLY_ACTIVE_ARCH = YES;
608608
SDKROOT = iphoneos;
@@ -650,7 +650,7 @@
650650
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
651651
GCC_WARN_UNUSED_FUNCTION = YES;
652652
GCC_WARN_UNUSED_VARIABLE = YES;
653-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
653+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
654654
MTL_ENABLE_DEBUG_INFO = NO;
655655
SDKROOT = iphoneos;
656656
SWIFT_COMPILATION_MODE = wholemodule;

‎samples/NativeCatalog/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
platform :ios, '12.0'
1+
platform :ios, '13.0'
22
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
33

44
target 'NativeCatalog' do

‎samples/NativeCatalog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "NativeCatalog",
3-
"version": "1.31.4",
3+
"version": "1.31.5",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",

‎samples/NativeCatalog/yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -5506,7 +5506,7 @@ react-native-gesture-handler@^1.3.0:
55065506
prop-types "^15.7.2"
55075507

55085508
"react-native-pspdfkit@file:../..":
5509-
version "1.31.4"
5509+
version "1.31.5"
55105510

55115511
react-native-safe-area-view@^0.14.1:
55125512
version "0.14.8"

‎screenshots/deployment-target.png

123 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.