diff --git a/README.md b/README.md index 929b2e32..3f362df4 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ yarn add github:PSPDFKit/react-native yarn install ``` -6. Open your project’s Podfile in a text editor to update the platform to iOS 12, and add the PSPDFKit Podspec: +6. Open your project’s Podfile in a text editor to update the platform to iOS 13, and add the PSPDFKit Podspec: ```bash open ios/Podfile @@ -90,7 +90,7 @@ require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' - platform :ios, '10.0' -+ platform :ios, '12.0' ++ platform :ios, '13.0' target 'PSPDFKitDemo' do config = use_native_modules! @@ -137,7 +137,7 @@ pod install open PSPDFKitDemo.xcworkspace ``` -7. Make sure the deployment target is set to 12.0 or higher: +7. Make sure the deployment target is set to 13.0 or higher: ![deployment-target](/screenshots/deployment-target.png) diff --git a/ios/RCTPSPDFKit.xcodeproj/project.pbxproj b/ios/RCTPSPDFKit.xcodeproj/project.pbxproj index 8e73809c..5e625e88 100644 --- a/ios/RCTPSPDFKit.xcodeproj/project.pbxproj +++ b/ios/RCTPSPDFKit.xcodeproj/project.pbxproj @@ -287,7 +287,7 @@ "$(SRCROOT)/../../react-native/React/**", "$(SRCROOT)/../samples/Catalog/node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -346,7 +346,7 @@ "$(SRCROOT)/../../react-native/React/**", "$(SRCROOT)/../samples/Catalog/node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m index 55ccc6b0..bb67b1ca 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m @@ -338,7 +338,6 @@ - (void)setupFromJSON:(id)json { SET(createAnnotationMenuEnabled, BOOL) SET(naturalDrawingAnnotationEnabled, BOOL) SET(drawCreateMode, PSPDFDrawCreateMode) - SET(showAnnotationMenuAfterCreation, BOOL) SET(shouldAskForAnnotationUsername, BOOL) SET(annotationEntersEditModeAfterSecondTapEnabled, BOOL) SET(autosaveEnabled, BOOL) diff --git a/package-lock.json b/package-lock.json index 7992ec5c..55aead38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.31.4", + "version": "1.31.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1d21003b..0149147c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.31.4", + "version": "1.31.5", "description": "A React Native module for the PSPDFKit library.", "keywords": [ "react native", diff --git a/react-native-pspdfkit.podspec b/react-native-pspdfkit.podspec index 84581298..0e704a86 100644 --- a/react-native-pspdfkit.podspec +++ b/react-native-pspdfkit.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.authors = ["PSPDFKit"] s.homepage = "https://github.com/PSPDFKit/react-native#readme" s.license = package['license'] - s.platform = :ios, "11.0" + s.platform = :ios, "13.0" s.module_name = 'PSPDFKitReactNativeiOS' s.source = { :git => "https://github.com/PSPDFKit/react-native" } s.source_files = "ios/*.{xcodeproj}", "ios/RCTPSPDFKit/*.{h,m,swift}", "ios/RCTPSPDFKit/Converters/*.{h,m,swift}" diff --git a/samples/Catalog/README.md b/samples/Catalog/README.md index 213b99b9..fa7ff103 100644 --- a/samples/Catalog/README.md +++ b/samples/Catalog/README.md @@ -6,32 +6,19 @@ The project contains a large set of sample code, which illustrates how to set up #### Requirements -- Android SDK -- Android NDK -- Android Build Tools 23.0.1 (React Native) -- Android Build Tools 28.0.3 (PSPDFKit module) -- Android Gradle plugin 3.4.1 or later. -- PSPDFKit for Android 6.6.0 or later. +- The [latest stable version of Android Studio](https://developer.android.com/studio). +- The [Android NDK](https://developer.android.com/studio/projects/install-ndk). +- An [Android Virtual Device](Android Virtual Device) or a hardware device. - React Native 0.60.4. #### Getting Started -1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`. -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.) -3. Update license key in `samples/Catalog/android/app/src/main/AndroidManifest.xml`: - -```xml - - ... - - - - -``` - -4. Catalog app is now ready to launch. From `samples/Catalog` directory run `react-native run-android`. +1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`. +2. Step into the Catalog project's directory: `cd react-native/samples/Catalog` +3. Install dependencies: run `yarn install`. +4. [Start your emulator](https://developer.android.com/studio/run/emulator#runningemulator). +5. Start the Metro bundler by running `react-native start`. +6. Catalog app is now ready to launch. From `samples/Catalog` directory run `react-native run-android`. ### Running the Catalog on iOS @@ -44,10 +31,15 @@ The project contains a large set of sample code, which illustrates how to set up #### Getting Started 1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`. -2. Step into your newly cloned folder: `cd react-native` and create a new `PSPDFKit` directory: `mkdir PSPDFKit`. -3. [Download the latest version of PSPDFKit for iOS](https://customers.pspdfkit.com/download/binary/ios/latest) and mount the DMG file. -4. Copy `PSPDFKit.xcframework` and `PSPDFKitUI.xcframework` into the `PSPDFKit` directory. -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.) -6. Run the app with `react-native-cli`: `react-native run-ios` +2. Step into your newly cloned folder: `cd react-native` +3. Create a new `PSPDFKit` directory: `mkdir PSPDFKit`. +4. [Download the latest version of PSPDFKit for iOS](https://customers.pspdfkit.com/download/binary/ios/latest) and mount the DMG file. +5. Copy `PSPDFKit.xcframework` and `PSPDFKitUI.xcframework` into the `PSPDFKit` directory. +6. Step into the Catalog project's directory: `cd /samples/Catalog` +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.) +8. Start the Metro bundler by running `react-native start` +9. Run the app with `react-native-cli`: `react-native run-ios` + +### Troubleshooting **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. diff --git a/samples/Catalog/ios/Catalog.xcodeproj/project.pbxproj b/samples/Catalog/ios/Catalog.xcodeproj/project.pbxproj index 4d187144..3a7b8b04 100644 --- a/samples/Catalog/ios/Catalog.xcodeproj/project.pbxproj +++ b/samples/Catalog/ios/Catalog.xcodeproj/project.pbxproj @@ -1112,7 +1112,7 @@ "$(inherited)", ); INFOPLIST_FILE = CatalogTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1249,7 +1249,7 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1301,7 +1301,7 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; diff --git a/samples/Catalog/package.json b/samples/Catalog/package.json index b5b6142e..a3ee2ffb 100644 --- a/samples/Catalog/package.json +++ b/samples/Catalog/package.json @@ -1,6 +1,6 @@ { "name": "Catalog", - "version": "1.31.4", + "version": "1.31.5", "private": true, "scripts": { "start": "react-native start", diff --git a/samples/Catalog/yarn.lock b/samples/Catalog/yarn.lock index 6661eb8f..d655082f 100644 --- a/samples/Catalog/yarn.lock +++ b/samples/Catalog/yarn.lock @@ -5415,7 +5415,7 @@ react-native-permissions@^1.1.1: integrity sha512-t0Ujm177bagjUOSzhpmkSz+LqFW04HnY9TeZFavDCmV521fQvFz82aD+POXqWsAdsJVOK3umJYBNNqCjC3g0hQ== "react-native-pspdfkit@file:../..": - version "1.31.4" + version "1.31.5" react-native-qrcode-scanner@^1.2.1: version "1.2.1" diff --git a/samples/NativeCatalog/README.md b/samples/NativeCatalog/README.md index 14e0d5a6..87e655e2 100644 --- a/samples/NativeCatalog/README.md +++ b/samples/NativeCatalog/README.md @@ -4,16 +4,34 @@ This second Catalog example serves to show you how you can leverage `PdfView` (A ### Running this Sample on Android -1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`. -2. Install dependencies: run `yarn install` from `samples/NativeCatalog` directory. -3. The Native Catalog app is now ready to launch. From `samples/NativeCatalog` directory run `react-native run-android`. +#### Requirements + +- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI). +- The [latest stable version of Android Studio](https://developer.android.com/studio). +- The [Android NDK](https://developer.android.com/studio/projects/install-ndk). +- An [Android Virtual Device](Android Virtual Device) or a hardware device. + +#### Getting Started + +1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`. +2. Step into the NativeCatalog project's directory: `cd react-native/samples/NativeCatalog`. +3. Install dependencies: run `yarn install`. +4. The Native Catalog app is now ready to launch: `react-native run-android`. ### Running this Sample on iOS -1. Clone the repository. `git clone https://github.com/PSPDFKit/react-native.git`. -2. Install dependencies: run `yarn install` from the `samples/NativeCatalog` directory. -3. `cd ios` then run `pod install`. -4. The Native Catalog app is now ready to launch. From `samples/NativeCatalog` directory run `react-native run-ios`. +- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI). +- The [latest stable version of Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12). +- 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. + +#### Getting Started + +1. Clone the repository: `git clone https://github.com/PSPDFKit/react-native.git`. +2. Step into the `NativeCatalog` project's directory: `cd react-native/samples/NativeCatalog`. +3. Install dependencies: run `yarn install`. +4. `cd ios` then run `pod install`. +5. Step back into the `NativeCatalog` project's directory: `cd ..`. +6. The Native Catalog app is now ready to launch: `react-native run-ios`. ### Examples diff --git a/samples/NativeCatalog/ios/NativeCatalog.xcodeproj/project.pbxproj b/samples/NativeCatalog/ios/NativeCatalog.xcodeproj/project.pbxproj index f00b9b31..ce5a328a 100644 --- a/samples/NativeCatalog/ios/NativeCatalog.xcodeproj/project.pbxproj +++ b/samples/NativeCatalog/ios/NativeCatalog.xcodeproj/project.pbxproj @@ -468,7 +468,7 @@ "$(inherited)", ); INFOPLIST_FILE = NativeCatalogTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", @@ -489,7 +489,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = NativeCatalogTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", @@ -602,7 +602,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -650,7 +650,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/samples/NativeCatalog/ios/Podfile b/samples/NativeCatalog/ios/Podfile index 39d0b691..ed56d849 100644 --- a/samples/NativeCatalog/ios/Podfile +++ b/samples/NativeCatalog/ios/Podfile @@ -1,4 +1,4 @@ -platform :ios, '12.0' +platform :ios, '13.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' target 'NativeCatalog' do diff --git a/samples/NativeCatalog/package.json b/samples/NativeCatalog/package.json index 89d038a8..9c8621c6 100644 --- a/samples/NativeCatalog/package.json +++ b/samples/NativeCatalog/package.json @@ -1,6 +1,6 @@ { "name": "NativeCatalog", - "version": "1.31.4", + "version": "1.31.5", "private": true, "scripts": { "android": "react-native run-android", diff --git a/samples/NativeCatalog/yarn.lock b/samples/NativeCatalog/yarn.lock index 8d1e7142..d81ba473 100644 --- a/samples/NativeCatalog/yarn.lock +++ b/samples/NativeCatalog/yarn.lock @@ -5506,7 +5506,7 @@ react-native-gesture-handler@^1.3.0: prop-types "^15.7.2" "react-native-pspdfkit@file:../..": - version "1.31.4" + version "1.31.5" react-native-safe-area-view@^0.14.1: version "0.14.8" diff --git a/screenshots/deployment-target.png b/screenshots/deployment-target.png index 8ea3a47d..14c13105 100644 Binary files a/screenshots/deployment-target.png and b/screenshots/deployment-target.png differ