ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.

Home Page:http://sabintsev.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[iOS14] Status bar color during Siren alert presentation

giofid opened this issue · comments

Hi @ArtSabintsev, I'm experiencing a problem with status bar style/color. Only in iOS14 the status bar changes color during the Siren alert presentation.

siren
Siren-master.zip

As you can see, the status bar is black before the alert is shown, it becomes wrongly white during Siren alert presentation and it comes back black after the alert disappears.

If I comment the preferredStatusBarStyle overriding in SirenViewController class, the problem goes away.

What is the purpose of this overriding? Is it possible to remove it?

It's needed to fix an issue on iOS 13, for which I do not recall the details. I can look into it a bit later.

There's also older reasons for it being there. There might be an exception we need to put in for iOS 14.

Also, I think your screenshots maybe wrong based on your explanation?

I replaced the screenshots with a gif. I hope it's much clearer now. As you can see, the statusbar is initially black, it becomes white when alert appears and it comes back black after the alert disappears.

The problem occurs only on iOS14.

I also attach a slightly modified version of the demo that shows the problem.

Thank you.

This should be fixed in v5.5.1 and beyond, which was just released.

Thanks!

Thank you @ArtSabintsev. The problem is now fixed!

Can I ask you what's the purpose of retaining the window in SirenViewController? I tried to comment this line and everything keeps working. Is this retain cycle no more needed?

It was to fix this issue: #305

Also, I may need to revert this change I made in this PR in the future since it was apparently attempting to fix a SceneDelegate issue in iOS 13. I’ll wait to see if anyone reports that issue still existing.