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

Add support for iOS #2

Closed
wants to merge 5 commits into from
Closed

Conversation

kawazoe
Copy link

@kawazoe kawazoe commented May 5, 2021

This PR strives to adds supports for iOS 11 to iOS 14.5 and beyond.

TODO:

  • Update the examples to include an iOS one.
  • More in depth testing.

Notes:
I am new to native iOS development, so please criticize harshly 😉

kawazoe added 5 commits April 28, 2021 22:41
Only support insets.top for now.
Uses UIApplication.willChangeStatusBarFrameNotification to monitor the status bar's size.
Ensure we monitor the correct events and that we don't
get our initial value too early.
- Refactor makeSafeArea to take a CGRect.
- Use an algorithm that is version independent.
- Remove un-used observer.
@felix-ulonska
Copy link

Is there a reason that this is not merged?

@kawazoe
Copy link
Author

kawazoe commented Dec 20, 2022

@felix-ulonska I haven't seen any activity in this project since its creation. You can use my fork if you want. There are also a few more improvements that didn't made it into this PR.

I haven't really maintained it since the newer iOS releases due to lack of hardware so there is a chance it might misbehave. You're open to contribute to my fork if you want, and when the maintainer of this project shows up, I'll happily contribute everything back here.

@tafelnl
Copy link
Member

tafelnl commented May 3, 2024

I've taken over maintenance of this plugin. My philosophy of approach is a bit different. Allow me to explain myself: on web and iOS the safe area insets are working correctly out of the box. So there's no need patching it for those platforms. On Android however, the safe area insets are not working correctly. Especially in combination with edge-to-edge mode. When edge-to-edge mode is disabled, the safe area insets are supposed to be always anyways. So patching is necessary only on Android, specifically when having edge-to-edge mode enabled.

That's why I've decided to create two methods for this plugin only: enable and disable. In fact this will enable or disable edge-to-edge mode on Android. It will also patch the safe area insets on Android. On web and iOS the methods have no effect (because remember it's working out of the box).

As a bonus these methods allow you to style the system bars. So you can set them to the color of your liking.

TLDR: I'm closing this PR

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

Successfully merging this pull request may close these issues.

3 participants