Skip to content

Commit

Permalink
Release 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PSPDFKit committed Jul 19, 2022
1 parent e8a8ffc commit 940ca0f
Show file tree
Hide file tree
Showing 38 changed files with 1,152 additions and 206 deletions.
402 changes: 339 additions & 63 deletions ACKNOWLEDGEMENTS.md

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
## Newest Release

### 3.3.0 - 19 Jul 2022

- Moved package files from `lib/src` to `lib` to remove import warnings and renamed `main.dart` to `pspdfkit.dart`. (#34058)
- Updates the deployment target to iOS 14.0. (#33871)
- PSPDFKit now requires Flutter 3.0.1 or later (#35028)
- Updates for PSPDFKit 11.4.0 for iOS. (#35384)
- Updates for PSPDFKit 8.2.1 for Android. (#35384)
- Handles multiple initializations exception. (#35079)
- Fixes an issue where tapping on form fields yields unexpected behavior in the Catalog basic example. (#33853)
- Fixes the configuration option `userInterfaceViewMode: 'alwaysHidden'` not hiding the widget’s top bar on iOS. (#31095)

## Previous Releases

### 3.2.2 - 16 Mar 2022

- Improves the example project by using the `PlatformUtils` class to check for supported platforms (#33212)
- Adds a new **Save As** example to the example project. (#33376)
- Updates for PSPDFKit 11.3.0 for iOS. (#33514)

## Previous Releases

### 3.2.1 - 04 Mar 2022

- Updates for PSPDFKit 8.1.2 for Android. (#33314)
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
```bash
open android/app/src/main/kotlin/com/example/pspdfkit_demo/pspdfkit_demo/MainActivity.kt
```

4. Modify the base from `FlutterActivity` to `FlutterFragmentActivity`:

```diff
Expand All @@ -65,13 +65,13 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
```
5. Open the project’s Gradle build file, `android/build.gradle`:
```bash
open android/build.gradle
```
6. Modify the Kotlin version inside the `buildscript` section:
```diff
buildscript {
- ext.kotlin_version = '1.3.50'
Expand Down Expand Up @@ -138,7 +138,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
mkdir PDFs
```
- Move a [sample document](example/PDFs/PSPDFKit.pdf) into the newly created `PDFs` directory, and rename it as `Document.pdf`:
- Move a [sample document](example/PDFs/PSPDFKit.pdf) into the newly created `PDFs` directory, and rename it as `Document.pdf`:
```bash
cp ~/Downloads/PSPDFKit.pdf PDFs/Document.pdf
Expand Down Expand Up @@ -190,7 +190,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
open ios/Runner.xcworkspace
```
4. Make sure the `iOS Deployment Target` is set to 13.0 or higher.
4. Make sure the `iOS Deployment Target` is set to 14.0 or higher.
![iOS Deployment Target](screenshots/ios-deployment-target.png)
Expand Down Expand Up @@ -225,16 +225,16 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
open ios/Podfile
```
10. Update the platform to iOS 13 and add the PSPDFKit Podspec:
10. Update the platform to iOS 14 and add the PSPDFKit Podspec:
```diff
-# platform :ios, '9.0'
+ platform :ios, '13.0'
+ platform :ios, '14.0'
...
target 'Runner' do
use_frameworks!
use_modular_headers!`
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+ pod 'PSPDFKit', podspec:'https://customers.pspdfkit.com/pspdfkit-ios/latest.podspec'
end
Expand Down Expand Up @@ -285,8 +285,8 @@ Showing a PDF document inside your Flutter app is as simple as this:
# Upgrading to a Full PSPDFKit License Key
PSPDFKit is a commercial product and requires the purchase of a license key when used in production. By default, this library will
initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
PSPDFKit is a commercial product and requires the purchase of a license key when used in production. By default, this library will
initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
To purchase a license for production use, please reach out to us via https://pspdfkit.com/sales/form/.
Expand Down
5 changes: 4 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
include: package:flutter_lints/flutter.yaml

analyzer:
# exclude:
# - ../../core/Vendor
errors:
invalid_assignment: error
missing_return: error
dead_code: warning
# avoid_print: false

strong-mode:
implicit-casts: false
Expand All @@ -25,5 +28,5 @@ linter:
- unawaited_futures
- unsafe_html
- use_full_hex_values_for_flutter_colors


4 changes: 2 additions & 2 deletions android/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (localPropertiesFile.exists()) {
}
}

ext.flutterRoot = localProperties.getProperty('flutter.sdk')
ext.flutterRoot = localProperties.getProperty('flutter.sdk') ?: "$System.env.FLUTTER_ROOT"
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
Expand All @@ -38,7 +38,7 @@ if (pspdfkitMavenUrl == null || pspdfkitMavenUrl == '') {

ext.pspdfkitVersion = localProperties.getProperty('pspdfkit.version')
if (pspdfkitVersion == null || pspdfkitVersion == '') {
ext.pspdfkitVersion = '8.1.2'
ext.pspdfkitVersion = '8.2.1'
}

ext.pspdfkitMavenModuleName = 'pspdfkit'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ internal class PSPDFKitView(
class PSPDFKitViewFactory(
private val messenger: BinaryMessenger,
) : PlatformViewFactory(StandardMessageCodec.INSTANCE) {
override fun create(context: Context, viewId: Int, args: Any?): PlatformView {
override fun create(context: Context?, viewId: Int, args: Any?): PlatformView {
val creationParams = args as Map<String?, Any?>?

return PSPDFKitView(
context,
context!!,
viewId,
messenger,
creationParams?.get("document") as String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import com.pspdfkit.PSPDFKit;
import com.pspdfkit.document.PdfDocument;
import com.pspdfkit.document.formatters.DocumentJsonFormatter;
import com.pspdfkit.exceptions.InvalidPSPDFKitLicenseException;
import com.pspdfkit.exceptions.PSPDFKitException;
import com.pspdfkit.flutter.pspdfkit.util.DocumentJsonDataProvider;
import com.pspdfkit.forms.ChoiceFormElement;
import com.pspdfkit.forms.EditableButtonFormElement;
Expand Down Expand Up @@ -62,16 +64,23 @@
*/
public class PspdfkitPlugin implements MethodCallHandler, PluginRegistry.RequestPermissionsResultListener,
FlutterPlugin, ActivityAware {
@NonNull private static final EventDispatcher eventDispatcher = EventDispatcher.getInstance();
@NonNull
private static final EventDispatcher eventDispatcher = EventDispatcher.getInstance();
private static final String LOG_TAG = "PSPDFKitPlugin";

/** Hybrid technology where the application is supposed to be working on. */
/**
* Hybrid technology where the application is supposed to be working on.
*/
private static final String HYBRID_TECHNOLOGY = "Flutter";

/** Atomic reference that prevents sending twice the permission result and throwing exception. */
@NonNull private final AtomicReference<Result> permissionRequestResult;
/**
* Atomic reference that prevents sending twice the permission result and throwing exception.
*/
@NonNull
private final AtomicReference<Result> permissionRequestResult;

@Nullable private ActivityPluginBinding activityPluginBinding;
@Nullable
private ActivityPluginBinding activityPluginBinding;

public PspdfkitPlugin() {
this.permissionRequestResult = new AtomicReference<>();
Expand Down Expand Up @@ -129,12 +138,20 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
case "setLicenseKey":
String licenseKey = call.argument("licenseKey");
requireNotNullNotEmpty(licenseKey, "License key");
PSPDFKit.initialize(activity, licenseKey, new ArrayList<>(), HYBRID_TECHNOLOGY);
try {
PSPDFKit.initialize(activity, licenseKey, new ArrayList<>(), HYBRID_TECHNOLOGY);
} catch (PSPDFKitException e) {
result.error("PSPDFKitException", e.getMessage(), null);
}
break;
case "setLicenseKeys":
String androidLicenseKey = call.argument("androidLicenseKey");
requireNotNullNotEmpty(androidLicenseKey, "Android License key");
PSPDFKit.initialize(activity, androidLicenseKey, new ArrayList<>(), HYBRID_TECHNOLOGY);
try {
PSPDFKit.initialize(activity, androidLicenseKey, new ArrayList<>(), HYBRID_TECHNOLOGY);
} catch (PSPDFKitException e) {
result.error("PSPDFKitException", e.getMessage(), null);
}
break;
case "present":
String documentPath = call.argument("document");
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
}

lintOptions {
disable 'InvalidPackage'
disable 'InvalidPackage', 'PSPDFKit-HandledConfigurationChanges-NoSupport'
}

defaultConfig {
Expand Down
6 changes: 3 additions & 3 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
~ UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
~ This notice may not be removed from this file.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pspdfkit.flutter.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pspdfkit.flutter.example">

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand All @@ -25,7 +24,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- Specify that the launch screen should continue being displayed -->
<!-- until Flutter renders its first frame. -->
<meta-data
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
platform :ios, '14.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -29,7 +29,7 @@ flutter_ios_podfile_setup

target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'PSPDFKit', '~> 11.3.0'
pod 'PSPDFKit', '~> 11.4'
end

post_install do |installer|
Expand Down
9 changes: 4 additions & 5 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
C3076FF4378A903F5B8F6AAC /* Pods-Runner.debug.xcconfig */,
8F541A3573E512AF9FB49541 /* Pods-Runner.release.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -361,7 +360,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -413,7 +412,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -433,7 +432,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -456,7 +455,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@
<true/>
<key>io.flutter.embedded_views_preview</key>
<true/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit 940ca0f

Please sign in to comment.