nutrient_flutter_ios 2.0.0
nutrient_flutter_ios: ^2.0.0 copied to clipboard
iOS implementation of the nutrient_flutter plugin.
2.0.0 29 Jul 2026 #
- Populates
PageInfo.labelfromPSPDFDocument.pageLabelForPageAtIndex(_, substituteWithPlainLabel:)on iOS (was previously alwaysnull). Falls back tonullwhen the PDF has no explicit label dictionary entry. (J#HYB-951) - Fixes
BookmarkManagerIOS.toBookmarkemittingactionJsonas{"pageIndex": N}without the"type": "goTo"discriminator. TheBookmark.pageIndexconvenience getter onnutrient_flutter/bindings.dartgates onaction['type'] == 'goTo'before readingpageIndex, so the getter always returnednullon iOS-sourced bookmarks. Now matches the Android and Web impls, which both already emit the canonical GoTo-action shape. (J#HYB-951) - Implements seven view-scoped methods on
IOSAdaptervia FFI (PSPDFViewController,PSPDFDocumentViewController,PSPDFPageView,PSPDFAnnotationStateManager):getVisibleRect,zoomToRect,getZoomScale,enterAnnotationCreationMode,exitAnnotationCreationMode,convertViewPointToPdfPoint,convertPdfPointToViewPoint.getZoomScalepreviously returned an error in the legacy plugin and is now functional viaPSPDFPageView.PDFScale. (J#HYB-952) - Adds
utils/annotation_tool_ios_mapping.dartwithiosAnnotationStringNameFor(testable, FFI-free) andiosAnnotationStringFor(FFI-touching) helpers, mapping the platform-interfaceAnnotationToolenum to the iOSPSPDFAnnotationString*constants. (J#HYB-952) - Adds a
nativeViewControlleraccessor onIOSAdapterfor subclasses that need directPSPDFViewControlleraccess from outside the existing lifecycle callbacks. - Wires
IOSAdapterto drive the cross-platformeventsstream via aPSPDFViewControllerDelegateattached inonPlatformViewCreated(beforeonViewControllerReady):didChangeDocument→DocumentLoadedEvent,willBeginDisplayingPageView→PageChangedEvent(deduped via_lastEmittedPageIndex),didSaveDocument:error:→DocumentSavedEvent/DocumentErrorEvent,didSelectAnnotations:onPageView:→AnnotationSelectedEvent+PageClickedEvent+IOSAnnotationTappedEvent,didDeselectAnnotations:onPageView:→AnnotationDeselectedEvent,didSelectText:withGlyphs:atRect:onPageView:→TextSelectionChangedEvent. (J#HYB-957) - Adds
IOSNutrientEventsealed class andiosEventsbroadcast stream onIOSAdapterfor iOS-only events:IOSViewControllerWillDismissEvent,IOSViewControllerDidDismissEvent,IOSViewModeChangedEvent,IOSUserInterfaceShownEvent,IOSUserInterfaceHiddenEvent,IOSAnnotationTappedEvent,IOSInstantDownloadFinishedEvent,IOSInstantDownloadFailedEvent. Subclasses can call the protectedemitIOSEvent(...)helper. (J#HYB-957) - Adds
NSNotificationCenter,NSNotification, andNSOperationQueuetoffigen_ios.yamland regenerates the iOS bindings to exposeaddObserverForName:object:queue:usingBlock:, the API needed to subscribe to PSPDFKit's annotation notifications (PSPDFAnnotationsAddedNotification,PSPDFAnnotationChangedNotification,PSPDFAnnotationsRemovedNotification). Previously only the notification names wereexternal'd in the bindings; the subscription API itself was missing. (J#HYB-957) - Subscribes to
PSPDFAnnotationsAdded/Changed/Removednotifications onNSNotificationCenter.defaultto fireAnnotationCreatedEvent/AnnotationUpdatedEvent/AnnotationDeletedEventon the cross-platform stream. Observer tokens are torn down indispose()viaremoveObserver:. The observer blocks useObjCBlock_ffiVoid_NSNotification.listener(...)(not.fromFunction(...)) so they can fire safely from PSPDFKit's background save queue without crashing indart::Assert::Fail/DLRT_GetFfiCallbackMetadata. (J#HYB-957) - Adds
UITapGestureRecognizertoffigen_ios.yaml, plus a small ObjC helper (_NutrientPageTapTarget+nutrient_install_page_tapC function inNutrientFFI.{h,mm}). Installs a permissive tap gesture recognizer on eachPSPDFPageViewfrom thedidConfigurePageView:forPageAtIndex:delegate so empty-page taps firePageClickedEventwith PDF-space coordinates, matching Android'sDocumentListener.onPageClickcontract. The Dart-side handler wraps aNativeCallable.listenerso the callback can fire from UIKit's gesture-recognizer dispatch thread. (J#HYB-957) - Updates to Nutrient iOS SDK 26.11.0 and regenerates the FFI bindings against its headers.
1.2.0 18 Jun 2026 #
- Adds AI Assistant support to
NutrientInstantViewIOSviaNutrientViewConfiguration.aiAssistantConfiguration. - Honours
NutrientViewConfiguration.enableInstantCommentsinNutrientInstantViewIOSby insertinginstantCommentMarkerintoeditableAnnotationTypesafter the Instant view controller is initialised.
1.1.1 16 Apr 2026 #
- Pins
PSPDFKitandInstantpodspec dependencies to matchnutrient_flutter.
1.1.0 09 Apr 2026 #
- Adds
NutrientInstantViewIOS, an iOS implementation of the embedded Instant document widget usingPSPDFInstantViewControllervia FFI. (J#HYB-988) - Fixes Instant two-way sync by retaining the
PSPDFInstantDocumentDescriptorfor the lifetime of the view controller, preventing ARC from releasing it and discarding the sync configuration. (J#HYB-988) - Fixes Instant sync not working on subsequent document opens by reauthenticating with the JWT when the document is already downloaded locally. (J#HYB-988)
- Adds
IOSConfigurationBuilderto convertNutrientViewConfigurationinto aPSPDFConfigurationBuilderJSON dict, supporting all major viewer options. (J#HYB-988)
1.0.2 24 Feb 2026 #
- Fixes a build error where
NutrientIOSBindings.mfailed to compile with'PSPDFKit/PSPDFKit.h' file not foundwhen using the plugin from a third-party app. The native-assets hook now resolves the PSPDFKit Pods directory from the consuming app instead of the plugin's own example app. (#50888) - Fixes
getViewControllerthread safety by dispatching to the main thread when called from a background thread. (#50888) - Improves build error reporting in
hook/build.dartby replacing a silentassertwith an explicit exception. (#50888)
1.0.1 22 Feb 2026 #
- Updates to Nutrient iOS SDK 26.5.0. (#50888)
- Regenerates FFI bindings for Nutrient iOS SDK 26.5.0. (#50888)
- Adds a native-assets build hook (
hook/build.dart) to compile ObjC protocol trampolines into a bundled dylib, fixing theNo asset foundruntime error for FFI delegates. (#50888) - Fixes an issue where
nutrient_get_view_controllerreturned null when called from theAdapterBridge/NutrientViewpath. (#50888) - Fixes AOT compilation errors caused by system opaque-struct globals (
_xpc_*,_dispatch_*,kDNSService*) in the generated bindings. (#50888) - Updates
objective_cto 9.3.0,ffito 2.2.0,ffigento 20.1.1,code_assetsto 1.0.0,hooksto 1.0.0,native_toolchain_cto 0.17.4. (#50888)
1.0.0 13 Feb 2026 #
- Initial release as standalone pub.dev package.
- Native iOS bindings using FFI for direct Nutrient iOS SDK integration.
- Provides platform adapter to extend
nutrient_flutterwith native bindings. - Implements
nutrient_flutter_platform_interfacefor the federated plugin architecture.