diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m b/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m index 32742de1..7e063ab2 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m +++ b/ios/RCTPSPDFKit/RCTPSPDFKitViewManager.m @@ -98,7 +98,15 @@ @implementation RCTPSPDFKitViewManager RCT_EXPORT_VIEW_PROPERTY(disableDefaultActionForTappedAnnotations, BOOL) -RCT_EXPORT_VIEW_PROPERTY(disableAutomaticSaving, BOOL) +RCT_CUSTOM_VIEW_PROPERTY(disableAutomaticSaving, BOOL, RCTPSPDFKitView) { + if (json) { + view.disableAutomaticSaving = [RCTConvert BOOL:json]; + [view.pdfController updateConfigurationWithBuilder:^(PSPDFConfigurationBuilder *builder) { + // Disable autosave in the configuration. + builder.autosaveEnabled = !view.disableAutomaticSaving; + }]; + } +} RCT_REMAP_VIEW_PROPERTY(color, tintColor, UIColor) diff --git a/package-lock.json b/package-lock.json index dcf3a58d..a2ccfcd1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.30.6", + "version": "1.30.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4439ea09..a5d60390 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.30.6", + "version": "1.30.7", "description": "A React Native module for the PSPDFKit library.", "keywords": [ "react native", diff --git a/samples/Catalog/package.json b/samples/Catalog/package.json index ed5c5c1d..096ef281 100644 --- a/samples/Catalog/package.json +++ b/samples/Catalog/package.json @@ -1,6 +1,6 @@ { "name": "Catalog", - "version": "1.30.6", + "version": "1.30.7", "private": true, "scripts": { "start": "react-native start", diff --git a/samples/NativeCatalog/package.json b/samples/NativeCatalog/package.json index 7414970c..110232a2 100644 --- a/samples/NativeCatalog/package.json +++ b/samples/NativeCatalog/package.json @@ -1,6 +1,6 @@ { "name": "NativeCatalog", - "version": "1.30.6", + "version": "1.30.7", "private": true, "scripts": { "android": "react-native run-android",