Skip to content

Commit dfe418c

Browse files
author
PSPDFKit
committed
Release 3.9.1
1 parent 12e4d5b commit dfe418c

15 files changed

+62
-42
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## Newest Release
22

3+
### 3.9.1 - 12 Apr 2024
4+
- Downgrades to AGP 7.* for backward compatibility (J#HYB-290)
5+
- Allow null value for `Pspdfkit.setLicenseKey` (J#HYB-294)
6+
- Updates for PSPDFKit 2024.2.1 for Android (J#HYB-303)
7+
8+
## Previous Releases
9+
310
### 3.9.0 - 22 Mar 2024
411

512
- Adds annotation toolbar customization for iOS and Android. (J#HYB-209)
@@ -9,8 +16,6 @@
916
- Fixes events callback functions not being triggered on Web. (J#HYB-221)
1017
- Fixes blank page when an annotation toolbar item is selected on Web. (#43792)
1118

12-
## Previous Releases
13-
1419
### 3.8.2 - 27 Feb 2024
1520

1621
- Updates for PSPDFKit 13.3.1 for iOS. (#43550)

android/build.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ apply plugin: 'kotlin-android'
3838
android {
3939
namespace "com.pspdfkit.flutter.pspdfkit"
4040

41-
compileSdkVersion androidCompileSdkVersion
41+
compileSdk androidCompileSdkVersion
4242

4343
compileOptions {
4444
sourceCompatibility JavaVersion.VERSION_17
@@ -56,12 +56,9 @@ android {
5656
}
5757

5858
dependencies {
59+
implementation 'androidx.appcompat:appcompat:1.6.1'
5960
implementation "com.pspdfkit:$pspdfkitMavenModuleName:$pspdfkitVersion"
6061
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
6162
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
62-
implementation "androidx.compose.material:material:1.6.3"
63-
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
64-
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
65-
implementation "androidx.compose.foundation:foundation:1.6.3"
66-
implementation "androidx.compose.ui:ui:1.6.3"
63+
implementation "androidx.compose.material:material:1.6.5"
6764
}

android/config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if (pspdfkitMavenUrl == null || pspdfkitMavenUrl == '') {
3838

3939
ext.pspdfkitVersion = localProperties.getProperty('pspdfkit.version')
4040
if (pspdfkitVersion == null || pspdfkitVersion == '') {
41-
ext.pspdfkitVersion = '2024.1.2'
41+
ext.pspdfkitVersion = '2024.2.1'
4242
}
4343

4444
ext.pspdfkitMavenModuleName = 'pspdfkit'
@@ -55,5 +55,5 @@ ext.pspdfkitFlutterVersion = pubspecYaml.version
5555
ext.androidCompileSdkVersion = 34
5656
ext.androidMinSdkVersion = 21
5757
ext.androidTargetSdkVersion = 34
58-
ext.androidGradlePluginVersion = '8.2.2'
59-
ext.kotlinVersion = "1.8.10"
58+
ext.androidGradlePluginVersion = '7.4.2'
59+
ext.kotlinVersion = "1.9.20"
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Wed Mar 27 15:41:24 EAT 2024
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

example/android/settings.gradle

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,24 @@ pluginManagement {
2323
mavenCentral()
2424
gradlePluginPortal()
2525
}
26+
27+
buildscript {
28+
repositories {
29+
mavenCentral()
30+
maven {
31+
url = uri("https://storage.googleapis.com/r8-releases/raw")
32+
}
33+
}
34+
dependencies {
35+
classpath("com.android.tools:r8:8.3.37")
36+
}
37+
}
2638
}
2739

2840
plugins {
2941
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
30-
id "com.android.application" version "8.2.2" apply false
31-
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
42+
id "com.android.application" version "7.3.0" apply false
43+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
3244
}
3345

3446
include ":app"

example/lib/main.dart

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ const String _pspdfkitFor = 'PSPDFKit for';
2222

2323
void main() {
2424
WidgetsFlutterBinding.ensureInitialized();
25+
// Since PSPDFKit for Flutter 3.9.0, you are now required to initialize PSPDFKit with a license key.
26+
// If you don't have one, you can set it to null. This will show a watermark on the document.
27+
// To get a trial license key, please visit https://my.pspdfkit.com/trial/new
28+
//
29+
// To set the license key for both platforms, use:
30+
// Pspdfkit.setLicenseKeys("YOUR_FLUTTER_ANDROID_LICENSE_KEY_GOES_HERE",
31+
// "YOUR_FLUTTER_IOS_LICENSE_KEY_GOES_HERE", "YOUR_FLUTTER_WEB_LICENSE_KEY_GOES_HERE");
32+
//
33+
// To set the license key for the currently running platform, use:
34+
// Pspdfkit.setLicenseKey(null);
35+
36+
Pspdfkit.setLicenseKey(null);
2537
runApp(const MyApp());
2638
}
2739

@@ -73,19 +85,6 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
7385

7486
// Platform messages are asynchronous, so we initialize in an async method.
7587
void initPlatformState() async {
76-
// By default, this example doesn't set a license key, but instead runs in
77-
// trial mode (which is the default, and which requires no specific
78-
// initialization). If you want to use a different license key for
79-
// evaluation (e.g. a production license), you can uncomment the next line
80-
// and set the license key.
81-
//
82-
// To set the license key for both platforms, use:
83-
// await Pspdfkit.setLicenseKeys("YOUR_FLUTTER_ANDROID_LICENSE_KEY_GOES_HERE",
84-
// "YOUR_FLUTTER_IOS_LICENSE_KEY_GOES_HERE");
85-
//
86-
// To set the license key for the currently running platform, use:
87-
await Pspdfkit.setLicenseKey('');
88-
8988
String? frameworkVersion;
9089
// Platform messages may fail, so we use a try/catch PlatformException.
9190
try {

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pspdfkit_example
22
description: Demonstrates how to use the pspdfkit plugin.
3-
version: 3.9.0
3+
version: 3.9.1
44
homepage: https://pspdfkit.com/
55
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
66
environment:

ios/Classes/PspdfkitPlugin.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,15 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
4141
result([@"iOS " stringByAppendingString:PSPDFKitGlobal.versionNumber]);
4242
} else if ([@"setLicenseKey" isEqualToString:call.method]) {
4343
NSString *licenseKey = call.arguments[@"licenseKey"];
44+
if ([licenseKey isKindOfClass:[NSNull class]]|| licenseKey.length <= 0) {
45+
return;
46+
}
4447
[PSPDFKitGlobal setLicenseKey:licenseKey options:@{PSPDFSettingKeyHybridEnvironment: @"Flutter"}];
4548
} else if ([@"setLicenseKeys" isEqualToString:call.method]) {
4649
NSString *iOSLicenseKey = call.arguments[@"iOSLicenseKey"];
50+
if ([iOSLicenseKey isKindOfClass:[NSNull class]]|| iOSLicenseKey.length <= 0) {
51+
return;
52+
}
4753
[PSPDFKitGlobal setLicenseKey:iOSLicenseKey options:@{PSPDFSettingKeyHybridEnvironment: @"Flutter"}];
4854
}else if ([@"present" isEqualToString:call.method]) {
4955

ios/pspdfkit_flutter.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
Pod::Spec.new do |s|
77
s.name = "pspdfkit_flutter"
8-
s.version = "3.9.0"
8+
s.version = "3.9.1"
99
s.homepage = "https://PSPDFKit.com"
1010
s.documentation_url = "https://pspdfkit.com/guides/flutter"
1111
s.license = { type: "Commercial", file: "../LICENSE" }
@@ -22,6 +22,6 @@ Pod::Spec.new do |s|
2222
s.dependency("Instant", "13.3.3")
2323
s.swift_version = "5.0"
2424
s.platform = :ios, "15.0"
25-
s.version = "3.9.0"
25+
s.version = "3.9.1"
2626
s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES", "SWIFT_INSTALL_OBJC_HEADER" => "NO" }
2727
end

lib/pspdfkit.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Pspdfkit {
4747

4848
/// Sets the license key.
4949
/// @param licenseKey The license key to be used.
50-
static Future<void> setLicenseKey(String licenseKey) =>
50+
static Future<void> setLicenseKey(String? licenseKey) =>
5151
PspdfkitFlutterPlatform.instance.setLicenseKey(licenseKey);
5252

5353
/// Sets the license keys for both platforms.

0 commit comments

Comments
 (0)