Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with Xcode11 causes status bar rotate #623

Closed
3 tasks done
fcojavierMT opened this issue Feb 10, 2020 · 21 comments · Fixed by #672
Closed
3 tasks done

Build with Xcode11 causes status bar rotate #623

fcojavierMT opened this issue Feb 10, 2020 · 21 comments · Fixed by #672

Comments

@fcojavierMT
Copy link

Bug Report

Problem

Hi,
If I build my app with Xcode11, after the first InApp browser plugin call, the status bar starts to rotate even if my screen orientation is forced to portrait. If I come back and build it with Xcode10, everything is fine.

What is expected to happen?

Status bar don't rotate, like on Xcode10.

What does actually happen?

Status bar rotates.

Information

Xcode: 11, plugin version: 3.2.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@rricamar
Copy link

rricamar commented Feb 10, 2020

Hi @fcojavierMT , I was reading your issue and I think is completely the same problem that one that I opened time ago: #564

Could you check the video that I left and confirm it?

@fcojavierMT
Copy link
Author

fcojavierMT commented Feb 10, 2020

Hi @rricamar, yes I saw your video and is completely the same issue. Hope someone of the team could help use since April Xcode10 is going to be deprecated! 😢

@sergicollado
Copy link

I'm suffering the same unexpected behaviour :(

@rricamar
Copy link

Hi @NiklasMerz , sorry in advance for mentioning you here, but I saw that you help in another issues of the repo. Do you have any idea of how solve this or some insight? Are we using the plugin in a non-desired way? Ty for any help you could provide 🙏 👍

@NiklasMerz
Copy link
Member

Please check #604 and related PRs and issues. There are plans to remove the fake statusbar in this plugin for the next version. There is not PR yet as far as I know.

@rricamar
Copy link

Hi @NiklasMerz ty again for helping with some info, really appreciated, I will read both issue and PR and keep following this, ty again 😇

@jcesarmobile
Copy link
Member

How are you locking the screen rotation? Can you provide a sample app? I can't reproduce

@rricamar
Copy link

rricamar commented Apr 11, 2020

How are you locking the screen rotation? Can you provide a sample app? I can't reproduce

Hi @jcesarmobile , ty for you reply,

On my case, the flow is the next:

  1. Using https://github.com/apache/cordova-plugin-screen-orientation I block the screen-orientation to only portrait. It works since in our app we have a public part which you can navigate without trying to login and the status bar doesn't rotate on that part
  2. After login (here is where we use in-app), status bar starts to rotate even if the screen stills locked to portrait, you can see it in the video left in Status Bar rotating even if screen rotation is lock #564 (you'll see how the home indicator appears on the left

I'll try to create a repo with a reproducible sample app asap, ty again 👍

@rricamar
Copy link

rricamar commented Apr 14, 2020

@jcesarmobile , here you have a minimal repo with a reproducible case:

https://github.com/rricamar/cordova-plugin-inappbrowser-623

Also, I left you here a .zip with two videos (one on a real device, one on the simulator) of the issue:

cordova-issue-623.zip

As you'll see, after inApp shows the status bar starts to rotate

I would like to try and make a PR by myself but I'm not familiar with source code nor iOS Native dev 😢

Let me know if I can help with anything, ty 👍

@rricamar
Copy link

@jcesarmobile , here you have a minimal repo with a reproducible case:

https://github.com/rricamar/cordova-plugin-inappbrowser-623

Also, I left you here a .zip with two videos (one on a real device, one on the simulator) of the issue:

cordova-issue-623.zip

As you'll see, after inApp shows the status bar starts to rotate

I would like to try and make a PR by myself but I'm not familiar with source code nor iOS Native dev 😢

Let me know if I can help with anything, ty 👍

Btw @NiklasMerz if you want to take a look to the videos maybe it can help with related issues, ty

@NiklasMerz
Copy link
Member

@rricamar Did you try using this version https://github.com/PDLMobileApps/cordova-plugin-inappbrowser#bug-hardcodedstatusbar from #656 instead of the latest released version?

It's work in progress but expected to be part of the next release.

@rricamar
Copy link

@rricamar Did you try using this version https://github.com/PDLMobileApps/cordova-plugin-inappbrowser#bug-hardcodedstatusbar from #656 instead of the latest released version?

It's work in progress but expected to be part of the next release.

Oh, I'll give a try, I'd let you know, thanks 👍

@jeirasmus
Copy link

jeirasmus commented Apr 14, 2020

@rricamar Did you try using this version https://github.com/PDLMobileApps/cordova-plugin-inappbrowser#bug-hardcodedstatusbar from #656 instead of the latest released version?

It's work in progress but expected to be part of the next release.

For me it did not help. I added the iab plugin from that repo and still the statusbar gets rotated. Hopefully this issue gets fixed soon since it's quite nasty.

And to make thing clear. The other content stays fixed as portrait like it should, but only the status bar gets rotated. Apparently opening iab releases something. Status bar does not rotate when iab is open.

@rricamar
Copy link

@rricamar Did you try using this version https://github.com/PDLMobileApps/cordova-plugin-inappbrowser#bug-hardcodedstatusbar from #656 instead of the latest released version?
It's work in progress but expected to be part of the next release.

For me it did not help. I added the iab plugin from that repo and still the statusbar gets rotated. Hopefully this issue gets fixed soon since it's quite nasty.

And to make thing clear. The other content stays fixed as portrait like it should, but only the status bar gets rotated. Apparently opening iab releases something. Status bar does not rotate when iab is open.

Ouch, I'll let you know if that works for me, meanwhile @jeirasmus I hid the status bar with this:

<edit-config file="*-Info.plist" target="UIStatusBarHidden" mode="merge">
    <true/>
</edit-config>
<edit-config file="*-Info.plist" target="UIViewControllerBasedStatusBarAppearance" mode="merge">
    <false/>
</edit-config>

Inside <platform name="ios"> section, if that could help you 👍

@jeirasmus
Copy link

@rricamar Did you try using this version https://github.com/PDLMobileApps/cordova-plugin-inappbrowser#bug-hardcodedstatusbar from #656 instead of the latest released version?
It's work in progress but expected to be part of the next release.

For me it did not help. I added the iab plugin from that repo and still the statusbar gets rotated. Hopefully this issue gets fixed soon since it's quite nasty.
And to make thing clear. The other content stays fixed as portrait like it should, but only the status bar gets rotated. Apparently opening iab releases something. Status bar does not rotate when iab is open.

Ouch, I'll let you know if that works for me, meanwhile @jeirasmus I hid the status bar with this:

<edit-config file="*-Info.plist" target="UIStatusBarHidden" mode="merge">
    <true/>
</edit-config>
<edit-config file="*-Info.plist" target="UIViewControllerBasedStatusBarAppearance" mode="merge">
    <false/>
</edit-config>

Inside <platform name="ios"> section, if that could help you 👍

My intension is not to hide the statusbar. I would like it to be visible all the time.

  1. open the application with forced rotation (does not matter if it forced with config.xml or with orientation plugin). At this point statusbar is not rotating to landscape.
  2. open some page with iabrowser
  3. close iabrowser (does not matter how)
  4. turn phone to landscape and see that statusbar is rotating

@rricamar
Copy link

rricamar commented Apr 15, 2020

Hi @NiklasMerz I can confirm that the PR you left yesterday doesn't solve the problem (status-bar keeps rotating), but at least it solves the problem of color on notch devices:

Screenshot 2020-04-15 at 12 10 40

Let me know if we can help testing at least another things, ty

@NiklasMerz
Copy link
Member

Ok so then this is a different issue. I was just hoping removing the fake statusbar solves this too.

@rricamar
Copy link

I've just seen your PR @jcesarmobile, hope it gets merged and released soon,
thank you for your help! 👍

@jeirasmus
Copy link

jeirasmus commented Apr 18, 2020

I've just seen your PR @jcesarmobile, hope it gets merged and released soon,
thank you for your help! 👍

It definitely fixes the issue, but noticed with iPhone 7+ that if iab is closed in landscape mode, statusbar reserved space shifts up with rest of the view. It is related with this issue here: https://stackoverflow.com/questions/36028852/cordova-inappbrowser-breaks-ui-while-screen-orientation-changes-from-landscape

That issue can be fixed by adding:
StatusBar.hide()
StatusBar.show()

after iab exit or close event. At least with iPhone 7+ it fixed that issue aswell.

@rricamar
Copy link

I've just seen your PR @jcesarmobile, hope it gets merged and released soon,
thank you for your help! 👍

It definitely fixes the issue, but noticed with iPhone 7+ that if iab is closed in landscape mode, statusbar reserved space shifts up with rest of the view. It is related with this issue here: https://stackoverflow.com/questions/36028852/cordova-inappbrowser-breaks-ui-while-screen-orientation-changes-from-landscape

That issue can be fixed by adding:
StatusBar.hide()
StatusBar.show()

after iab exit or close event. At least with iPhone 7+ it fixed that issue aswell.

Ouch... good to know at least, if this gets merged I'll give a try, at least installing plugin from master should do the trick, thanks a lot for the info 👍

@artberri
Copy link

I've tested this (from master branch) on iPhone XR (real device) and iPhone 11 (simulator) ant it works fine. We were waiting for new release of the plugin but finally we pointed to master branch instead.

What kind of policy is used to decide wheter to bumb a new version to NPM or not? (not try to add pressure, I just want to know)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants