Skip to content

Commit 9f183cf

Browse files
committed
Release 5.5.1
1 parent 3b0630f commit 9f183cf

File tree

6 files changed

+54
-6
lines changed

6 files changed

+54
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 5.5.1 - 16 Apr 2026
2+
3+
- Fixes `Nutrient.present(...)` failing on iOS apps using the `UIScene` lifecycle. (J#HYB-992)
4+
15
## 5.5.0 — 09 Apr 2026
26

37
- Adds `NutrientInstantView`, a widget that embeds a live Instant document directly in the Flutter widget tree with real-time collaboration support on Android and iOS. (J#HYB-988)
@@ -14,10 +18,10 @@
1418
- Fixes an Android issue where interactions were incorrectly routed when multiple `NutrientView` instances were shown simultaneously. (J#HYB-136)
1519
- Fixes annotation model validation and serialization issues. (J#HYB-821)
1620

17-
## 5.4.1 - 22 Feb 2026
21+
## 5.4.1 22 Feb 2026
1822

1923
- Updates to Nutrient iOS SDK 26.5.0. (#50888)
20-
- Fixes an iOS issue where the `AdapterBridge` couldn't retrieve the `PSPDFViewController` via FFI when using `NutrientView` with a platform adapter. (#50888)
24+
- Fixes an iOS issue where the `AdapterBridge` couldnt retrieve the `PSPDFViewController` via FFI when using `NutrientView` with a platform adapter. (#50888)
2125

2226
## 5.4.0 — 18 Feb 2026
2327

example/ios/Runner/Info.plist

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,27 @@
2727
<key>NSAllowsLocalNetworking</key>
2828
<true/>
2929
</dict>
30+
<key>UIApplicationSceneManifest</key>
31+
<dict>
32+
<key>UIApplicationSupportsMultipleScenes</key>
33+
<false/>
34+
<key>UISceneConfigurations</key>
35+
<dict>
36+
<key>UIWindowSceneSessionRoleApplication</key>
37+
<array>
38+
<dict>
39+
<key>UISceneClassName</key>
40+
<string>UIWindowScene</string>
41+
<key>UISceneConfigurationName</key>
42+
<string>flutter</string>
43+
<key>UISceneDelegateClassName</key>
44+
<string>FlutterSceneDelegate</string>
45+
<key>UISceneStoryboardFile</key>
46+
<string>Main</string>
47+
</dict>
48+
</array>
49+
</dict>
50+
</dict>
3051
<key>UILaunchStoryboardName</key>
3152
<string>LaunchScreen</string>
3253
<key>UIMainStoryboardFile</key>

example/pubspec.yaml

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

ios/Classes/PspdfkitApiImpl.swift

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ public class PspdfkitApiImpl: NSObject, NutrientApi, PDFViewControllerDelegate,
607607

608608
let navigationController = PDFNavigationController(rootViewController: pdfViewController)
609609
navigationController.modalPresentationStyle = .fullScreen
610-
if let presentingViewController = UIApplication.shared.delegate?.window??.rootViewController {
610+
if let presentingViewController = Self.topmostPresentedViewController() {
611611
presentingViewController.present(navigationController, animated: true) {
612612
completion(.success(true))
613613
}
@@ -616,6 +616,29 @@ public class PspdfkitApiImpl: NSObject, NutrientApi, PDFViewControllerDelegate,
616616
completion(.failure(error))
617617
}
618618
}
619+
620+
/// Resolves the topmost view controller suitable for modal presentation. Prefers the
621+
/// foreground-active `UIWindowScene` path used by modern (scene-based) apps and falls
622+
/// back to the legacy `UIApplication.delegate.window` path for apps that still own
623+
/// their window on the app delegate. Walks through any already-presented controllers
624+
/// so we never try to present on a controller that is itself presenting.
625+
private static func topmostPresentedViewController() -> UIViewController? {
626+
let scenes = UIApplication.shared.connectedScenes
627+
let activeScene = scenes.first(where: { $0.activationState == .foregroundActive }) ?? scenes.first
628+
var rootViewController: UIViewController?
629+
if let windowScene = activeScene as? UIWindowScene {
630+
let keyWindow = windowScene.windows.first(where: { $0.isKeyWindow }) ?? windowScene.windows.first
631+
rootViewController = keyWindow?.rootViewController
632+
}
633+
if rootViewController == nil {
634+
rootViewController = UIApplication.shared.delegate?.window??.rootViewController
635+
}
636+
var topController = rootViewController
637+
while let presented = topController?.presentedViewController {
638+
topController = presented
639+
}
640+
return topController
641+
}
619642

620643
func checkAndroidWriteExternalStoragePermission(completion: @escaping (Result<Bool?, any Error>) -> Void) {
621644
completion(.failure(NutrientApiError(code: "", message: "Not implements", details: nil)))

ios/nutrient_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
Pod::Spec.new do |s|
77
s.name = "nutrient_flutter"
8-
s.version = "5.5.0"
8+
s.version = "5.5.1"
99
s.homepage = "https://nutrient.io"
1010
s.documentation_url = "https://nutrient.io/guides/flutter"
1111
s.license = { type: "Commercial", file: "../LICENSE" }

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nutrient_flutter
22
description: A Flutter plugin providing a feature-rich PDF viewing and editing experience to your users with the powerful Nutrient PDF SDK.
3-
version: 5.5.0
3+
version: 5.5.1
44
homepage: https://nutrient.io/
55
repository: https://github.com/PSPDFKit/pspdfkit-flutter
66
issue_tracker: https://support.nutrient.io/hc/en-us/requests/new

0 commit comments

Comments
 (0)