Skip to content

Commit 8deb964

Browse files
Merge pull request #21 from spoonconsulting/fix-image-picker-bug
Fix image picker bug
2 parents 9238acc + 3b3375e commit 8deb964

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## [2.1.1](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.0.5...2.1.1) (2024-05-21)
1+
## [2.1.2](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.1.1...2.1.2) (2024-05-27)
2+
3+
* **ios:** Bug Fix.
4+
5+
## [2.1.1](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.1.0...2.1.1) (2024-05-21)
26

37
* **ios:** Added a method `closeImagePicker` to close the image picker on ios devices.
48

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spoonconsulting/cordova-plugin-telerik-imagepicker",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"cordova_name": "ImagePicker",
55
"description": "This plugin allows selection of multiple images from the camera roll / gallery in a phonegap app",
66
"license": "MIT",

plugin.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
id="@spoonconsulting/cordova-plugin-telerik-imagepicker"
5-
version="2.1.1">
5+
version="2.1.2">
66

77
<name>ImagePicker</name>
88

src/ios/SOSPicker.h

-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@
2525
@property (nonatomic, assign) NSInteger height;
2626
@property (nonatomic, assign) NSInteger quality;
2727
@property (nonatomic, assign) NSInteger outputType;
28-
@property (nonatomic, assign) GMImagePickerController* imagePicker;
2928

3029
@end

src/ios/SOSPicker.m

+2-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ - (void)launchGMImagePicker:(bool)allow_video title:(NSString *)title message:(N
8383
picker.colsInPortrait = 4;
8484
picker.colsInLandscape = 6;
8585
picker.minimumInteritemSpacing = 2.0;
86-
self.imagePicker = picker;
8786

8887
if(!disable_popover) {
8988
picker.modalPresentationStyle = UIModalPresentationPopover;
@@ -283,8 +282,8 @@ -(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker
283282

284283
- (void) closeImagePicker:(CDVInvokedUrlCommand *)command {
285284
bool boolMessage = FALSE;
286-
if (self.imagePicker && self.imagePicker.presentingViewController) {
287-
[self.imagePicker.presentingViewController dismissViewControllerAnimated:YES completion:nil];
285+
if (self.viewController != nil) {
286+
[self.viewController dismissViewControllerAnimated:YES completion:nil];
288287
boolMessage = TRUE;
289288
}
290289
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:boolMessage];

0 commit comments

Comments
 (0)