Skip to content

Commit 2bdacfd

Browse files
authored
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 19 additions & 27 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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"

0 commit comments

Comments
 (0)