camera-preview icon indicating copy to clipboard operation
camera-preview copied to clipboard

Camera Preview is Out of Screen on IOS

Open Saqib92 opened this issue 3 years ago • 11 comments

Describe the bug CameraPreview() is out of bond / Screen when application start for the very first time / coming from lock screen. When user unlock application preview is out of screen again.

To Reproduce Steps to reproduce the behavior:

  1. Open Application very first time / Lock & Unlock screen when application is running.
  2. go to any other view and coming back to home page is working fine.

Expected behavior CameraPreview stay on its place do not change position on lock screen or First time application start.

Screenshots 2022-07-05

Smartphone (please complete the following information):

  • Device: iPhone
  • OS: iOS 15.5

Additional context Working fine on Android. This bug is happening on IOS only. When user Install application and open first time this is happening or user Unlock their phone this is happening. Coming back to home screen form other screen this is not happening.

Saqib92 avatar Jul 05 '22 08:07 Saqib92

Hi @Saqib92 I'm getting crazy with issue #221 , but it seems that your app is not affected by that. I have a couple of questions:

  1. What version of Capacitor, Ionic and plugin are you using?
  2. Can you reproduce the issue with the demo app?

sertal70 avatar Jul 07 '22 10:07 sertal70

Hi @Saqib92 I'm getting crazy with issue #221 , but it seems that your app is not affected by that. I have a couple of questions:

  1. What version of Capacitor, Ionic and plugin are you using? A: Capacitor 3.6.0, Ionic: 6.1.9, Plugin: 3.1.0
  2. Can you reproduce the issue with the demo app? A: Not checked with demo app.

But to overcome these issues i removed capacitor plugin and used Cordova camera preview. and everything is working fine now.

Saqib92 avatar Jul 09 '22 10:07 Saqib92

thank you @Saqib92 , I too tried with Cordova camera preview but unfortunately toBack option does not work when using that plugin with Capacitor and I need that option in my app.

sertal70 avatar Jul 09 '22 11:07 sertal70

Hi @Saqib92, sorry to hear you've got problems with the position of the camera. I've tried to reproduce this and I can't make it happen with Capacitor 3.2.5 / Ionic 5. I don't yet have an Ionic 6 app to test with to see if that's changed how the layout works, but will try to upgrade to Capacitor 3.6 soon and see what happens.

pbowyer avatar Jul 20 '22 19:07 pbowyer

Thank you. If i get a chance i will create Ionic 6 and capacitor 3.6+ project for your help.

Saqib92 avatar Jul 21 '22 07:07 Saqib92

Hi @Saqib92, sorry to hear you've got problems with the position of the camera. I've tried to reproduce this and I can't make it happen with Capacitor 3.2.5 / Ionic 5. I don't yet have an Ionic 6 app to test with to see if that's changed how the layout works, but will try to upgrade to Capacitor 3.6 soon and see what happens.

Still facing same issue on Capacitor 4, ionic 6,

Reproducible git repo:

capacitor-preview-camera-test

Saqib92 avatar Aug 22 '22 10:08 Saqib92

thank you @Saqib92 , I too tried with Cordova camera preview but unfortunately toBack option does not work when using that plugin with Capacitor and I need that option in my app.

did you found a solution for iOS for toBack?

Saqib92 avatar Aug 22 '22 10:08 Saqib92

@Saqib92 no, Cordova Camera Preview is incompatibile with Capacitor, because the framework handles the WebView in a different way than Cordova.

sertal70 avatar Aug 22 '22 12:08 sertal70

@sertal70 in my application cordova plugin is working fine. jsut toBack is not working in ios.

Saqib92 avatar Aug 22 '22 12:08 Saqib92

@Saqib92 you're right, with "is incompatible" I was implicitly referring to the toBack feature

sertal70 avatar Aug 22 '22 12:08 sertal70

@Saqib92 you're right, with "is incompatible" I was implicitly referring to the toBack feature

ohh okay. But is there any workaround for this??

Saqib92 avatar Aug 22 '22 12:08 Saqib92