diff --git a/CHANGELOG.md b/CHANGELOG.md index 966b243e..b3ba8c82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -## [2.1.1](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.0.5...2.1.1) (2024-05-21) +## [2.1.2](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.1.1...2.1.2) (2024-05-27) + +* **ios:** Bug Fix. + +## [2.1.1](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.1.0...2.1.1) (2024-05-21) * **ios:** Added a method `closeImagePicker` to close the image picker on ios devices. diff --git a/package-lock.json b/package-lock.json index d3233170..e3770fbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@spoonconsulting/cordova-plugin-telerik-imagepicker", - "version": "2.1.1", + "version": "2.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@spoonconsulting/cordova-plugin-telerik-imagepicker", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "engines": { "name": "cordova", diff --git a/package.json b/package.json index cba2eed0..6b10a943 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@spoonconsulting/cordova-plugin-telerik-imagepicker", - "version": "2.1.1", + "version": "2.1.2", "cordova_name": "ImagePicker", "description": "This plugin allows selection of multiple images from the camera roll / gallery in a phonegap app", "license": "MIT", diff --git a/plugin.xml b/plugin.xml index af3ee512..f3b2d19c 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.1.2"> ImagePicker diff --git a/src/ios/SOSPicker.h b/src/ios/SOSPicker.h index 1efc3335..12bdfeeb 100644 --- a/src/ios/SOSPicker.h +++ b/src/ios/SOSPicker.h @@ -25,6 +25,5 @@ @property (nonatomic, assign) NSInteger height; @property (nonatomic, assign) NSInteger quality; @property (nonatomic, assign) NSInteger outputType; -@property (nonatomic, assign) GMImagePickerController* imagePicker; @end diff --git a/src/ios/SOSPicker.m b/src/ios/SOSPicker.m index 3bc8839a..83dc60b7 100644 --- a/src/ios/SOSPicker.m +++ b/src/ios/SOSPicker.m @@ -83,7 +83,6 @@ - (void)launchGMImagePicker:(bool)allow_video title:(NSString *)title message:(N picker.colsInPortrait = 4; picker.colsInLandscape = 6; picker.minimumInteritemSpacing = 2.0; - self.imagePicker = picker; if(!disable_popover) { picker.modalPresentationStyle = UIModalPresentationPopover; @@ -283,8 +282,8 @@ -(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker - (void) closeImagePicker:(CDVInvokedUrlCommand *)command { bool boolMessage = FALSE; - if (self.imagePicker && self.imagePicker.presentingViewController) { - [self.imagePicker.presentingViewController dismissViewControllerAnimated:YES completion:nil]; + if (self.viewController != nil) { + [self.viewController dismissViewControllerAnimated:YES completion:nil]; boolMessage = TRUE; } CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:boolMessage];