From 565d814d2120d76f57c39e581cb55a0f97380d12 Mon Sep 17 00:00:00 2001 From: parveshneedhoo Date: Fri, 30 Jun 2023 13:24:45 +0400 Subject: [PATCH 1/8] use interfaceOrientation for ios 13+ --- src/ios/GMImagePicker/GMGridViewController.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ios/GMImagePicker/GMGridViewController.m b/src/ios/GMImagePicker/GMGridViewController.m index a2e30208..92a13ba9 100755 --- a/src/ios/GMImagePicker/GMGridViewController.m +++ b/src/ios/GMImagePicker/GMGridViewController.m @@ -95,7 +95,7 @@ -(id)initWithPicker:(GMImagePickerController *)picker } else { - if(UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) + if(UIInterfaceOrientationIsLandscape([self getOrientation])) { screenHeight = CGRectGetWidth(picker.view.bounds); screenWidth = CGRectGetHeight(picker.view.bounds); @@ -108,7 +108,7 @@ -(id)initWithPicker:(GMImagePickerController *)picker } - UICollectionViewFlowLayout *layout = [self collectionViewFlowLayoutForOrientation:[UIApplication sharedApplication].statusBarOrientation]; + UICollectionViewFlowLayout *layout = [self collectionViewFlowLayoutForOrientation:[self getOrientation]]; if (self = [super initWithCollectionViewLayout:layout]) { //Compute the thumbnail pixel size: @@ -794,5 +794,14 @@ - (NSArray *)assetsAtIndexPaths:(NSArray *)indexPaths return assets; } +- (UIInterfaceOrientation) getOrientation { + if (@available(iOS 13.0, *)) { + UIWindowScene *activeWindow = (UIWindowScene *)[[[UIApplication sharedApplication] windows] firstObject]; + return [activeWindow interfaceOrientation] ?: UIInterfaceOrientationPortrait; + } else { + return [[UIApplication sharedApplication] statusBarOrientation]; + } +} + @end From dd0a22d782dca5229d77e5e1c59a9ed139a87f61 Mon Sep 17 00:00:00 2001 From: parveshneedhoo Date: Tue, 11 Jul 2023 13:00:51 +0400 Subject: [PATCH 2/8] Change plugin version --- CHANGELOD.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- plugin.xml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOD.md b/CHANGELOD.md index 4aae9cbe..9ccaaedd 100644 --- a/CHANGELOD.md +++ b/CHANGELOD.md @@ -1,3 +1,7 @@ +## [2.0.4](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.0.3...2.0.4) (2023-07-11) + +* **ios:** Use interfaceOrientation for ios 13+. + ## [2.0.3](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.0.2...2.0.3) (2023-02-27) * **android:** Add READ_MEDIA_IMAGES permission for Android 13(Required in API 33). diff --git a/package-lock.json b/package-lock.json index c7647697..49a786f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@spoonconsulting/cordova-plugin-telerik-imagepicker", - "version": "2.0.3", + "version": "2.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@spoonconsulting/cordova-plugin-telerik-imagepicker", - "version": "2.0.3", + "version": "2.0.4", "license": "MIT", "engines": { "name": "cordova", diff --git a/package.json b/package.json index 01eaee04..26a0a33b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@spoonconsulting/cordova-plugin-telerik-imagepicker", - "version": "2.0.3", + "version": "2.0.4", "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 851b633a..01185328 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.0.4"> ImagePicker From f157bae1341d1ec3374ecbbf56c6d36b2112150d Mon Sep 17 00:00:00 2001 From: parveshneedhoo Date: Wed, 12 Jul 2023 09:27:32 +0400 Subject: [PATCH 3/8] change date --- CHANGELOD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOD.md b/CHANGELOD.md index 9ccaaedd..9f1c6f8c 100644 --- a/CHANGELOD.md +++ b/CHANGELOD.md @@ -1,4 +1,4 @@ -## [2.0.4](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.0.3...2.0.4) (2023-07-11) +## [2.0.4](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.0.3...2.0.4) (2023-07-12) * **ios:** Use interfaceOrientation for ios 13+. From 8b4983074c2a069e1c940da2d82350d53b02671a Mon Sep 17 00:00:00 2001 From: zfir Date: Thu, 13 Jul 2023 10:54:56 +0400 Subject: [PATCH 4/8] Test --- .github/workflows/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 877d4ae1..c287ca1a 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -7,7 +7,7 @@ jobs: - uses: actions/checkout@v2 - uses: bahmutov/npm-install@v1 - id: publish - uses: JS-DevTools/npm-publish@v1 + uses: JS-DevTools/npm-publish@v2 with: token: ${{ secrets.npm_token }} From f533ba57e8c4c272ac9dd4ac3458f3944992b54f Mon Sep 17 00:00:00 2001 From: zfir Date: Thu, 13 Jul 2023 10:57:28 +0400 Subject: [PATCH 5/8] Echo --- .github/workflows/npm-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c287ca1a..dc5dce8c 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,6 +8,7 @@ jobs: - uses: bahmutov/npm-install@v1 - id: publish uses: JS-DevTools/npm-publish@v2 + run: echo ${{ secrets.npm_token }} with: token: ${{ secrets.npm_token }} From ce07a734456cd79a6384a73469e51eadc36727bc Mon Sep 17 00:00:00 2001 From: zfir Date: Thu, 13 Jul 2023 10:58:26 +0400 Subject: [PATCH 6/8] Echo --- .github/workflows/npm-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index dc5dce8c..67242250 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -6,9 +6,10 @@ jobs: steps: - uses: actions/checkout@v2 - uses: bahmutov/npm-install@v1 + - id: test + run: echo ${{ secrets.npm_token }} - id: publish uses: JS-DevTools/npm-publish@v2 - run: echo ${{ secrets.npm_token }} with: token: ${{ secrets.npm_token }} From ebe640917dd8d57d662f73bd1f70967522c2df5e Mon Sep 17 00:00:00 2001 From: zfir Date: Thu, 13 Jul 2023 11:01:50 +0400 Subject: [PATCH 7/8] name --- .github/workflows/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 67242250..166ac72e 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -6,7 +6,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: bahmutov/npm-install@v1 - - id: test + - name: test run: echo ${{ secrets.npm_token }} - id: publish uses: JS-DevTools/npm-publish@v2 From 57deac54a42ae4199237b9ecc2d47460505cebe3 Mon Sep 17 00:00:00 2001 From: zfir Date: Thu, 13 Jul 2023 11:03:25 +0400 Subject: [PATCH 8/8] Clean --- .github/workflows/npm-publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 166ac72e..c287ca1a 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -6,8 +6,6 @@ jobs: steps: - uses: actions/checkout@v2 - uses: bahmutov/npm-install@v1 - - name: test - run: echo ${{ secrets.npm_token }} - id: publish uses: JS-DevTools/npm-publish@v2 with: