Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Interactive dismissal in iOS 13 #814

Open
vlinde opened this issue Aug 27, 2019 · 14 comments
Open

Interactive dismissal in iOS 13 #814

vlinde opened this issue Aug 27, 2019 · 14 comments

Comments

@vlinde
Copy link

vlinde commented Aug 27, 2019

Expected Behaviour

Slide down to fully close the modal.

Actual Behaviour

The modal dissapears but the process remains active.
If the modal is closed using the slide action, you cannot open for the second time.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Open the modal and slide down.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

iOS 13

Plugin version

phonegap-plugin-barcodescanner 8.1.1-dev "BarcodeScanner"

@vlinde
Copy link
Author

vlinde commented Aug 28, 2019

The issue appears when the app is builded with xCode 11.
Here is the fix: vlinde@2d5bb2e

@brandonhudson
Copy link

@vlinde DId you open a pull request for that change?

@whodeee
Copy link

whodeee commented Sep 30, 2019

@brandonhudson Doesn't look like one was created. I can confirm that the fix from @vlinde works - it disables the ability to swipe the modal.

@brandonhudson
Copy link

Awesome, thanks!

@vlinde
Copy link
Author

vlinde commented Oct 9, 2019 via email

@Adrian-GP
Copy link

I think the code need to be updated, I’ll check today. This condition if (@available(iOS 13.0, *)) need to be changed to work an all devices with iOS 13. You can try to replace 13.0 with 13.

On 9 Oct 2019, at 02:47, Adrián Peña @.***> wrote: So basically you must edit the .mm in the plugins/barcodescanner/src/ios/CDVBarcodeScanner.mm and that's all? I feel like I'm missing something, I already raw pasted the whole corrected .mm and still will allow iOS 13 users to swipe the modal out.

It was my bad, for some reason I got 2 different CDVBarcodeScanner.mm, I changed both and it worked.
Not sure why I have both but... now it works!
Thanks alot!

@eshope-repo
Copy link

Could you be more precise on how to fix this problem ?
I changed both files CDVBarcodeScanner.mm (in xcode project and in the ionic project) according to @vlinde's fix but I still have the hability to swipe down the scanner.

I have also the problem about the process still running when I click the cancel button which makes me impossible to re launch the scanner a second time.

@nakhadon
Copy link

@eshope-repo There is an alternative solution to this problem. If fullscreen is not an issue with you, the default screen mode can be opened as PresentationFullscreen like this: nakhadon@1332ba0. The screen is then opened as fullscreen and a swipe down to close the camera is not possible.

If this is a viable solution and fullscreen is not an issue for everyone, I can start a PR.

@mobychan
Copy link

mobychan commented Dec 3, 2019

Any Updates on this?
Aka when will this be integrated/fixed?
We're facing the problem simply when trying to scan a second time which can happen a lot in our app so this is breaking the whole functionality for us.

@stale
Copy link

stale bot commented Mar 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale issues lacking attention, or potentially abandoned label Mar 2, 2020
@elvisgraho
Copy link

@nakhadon Thank you! Please merge the fix!

@stale stale bot removed the stale issues lacking attention, or potentially abandoned label Mar 6, 2020
@Soryuk
Copy link

Soryuk commented Apr 10, 2020

Hi, i found a solution to display the scanner in full screen and not in modal (pending official correction)

In the CDVBarcodeScanner.mm file (cordova-plugin-barcodescanner)

1/ Find & Replace openDialog function (in Xcode)
2/ Re-build app & try

- (void)openDialog { [self.viewController setModalPresentationStyle:UIModalPresentationFullScreen]; [self.parentViewController presentViewController:self.viewController animated: NO completion:nil]; }

I hope you help

micbis added a commit to byteworks-ch/phonegap-plugin-barcodescanner that referenced this issue May 1, 2020
@WIStudent
Copy link

Guess someone created a pull request #869

@5r1m
Copy link

5r1m commented Aug 5, 2020

There are many pull requests but no committer is approving or rejecting it and thats unfortunate. This will force many of us to move away from this plugin if it is not maintained

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.