Giter Site home page Giter Site logo

aashu-dubey / capacitor-statusbar-safe-area Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 9.0 688 KB

Capacitor Package to get Status bar height and Safe area insets on Android & iOS.

Home Page: https://npmjs.com/package/@aashu-dubey/capacitor-statusbar-safe-area

License: MIT License

Ruby 7.02% Java 21.52% Swift 21.53% Objective-C 2.88% JavaScript 20.63% TypeScript 21.93% CSS 0.17% HTML 4.32%
android capacitor capacitor-plugin cross-platform ionic ios library npm-package package plugin

capacitor-statusbar-safe-area's People

Contributors

aashu-dubey avatar hrdtr avatar jjang16 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

capacitor-statusbar-safe-area's Issues

Error when using with Nuxt.js

When using within my Nuxt.js environment, I am getting an error message on npm run dev.

[nuxt] [request error] [unhandled] [500] HTMLElement is not defined
  at Object.<anonymous> (./node_modules/@aashu-dubey/capacitor-statusbar-safe-area/dist/plugin.cjs.js:38:31) 

When I remove "SafeAreaElement" from the plugin code, all is working well.(I do not need SafeSreaElement, only "getSafeAreaInsets"), so I could do a fork, but maybe you can have look into it.

Maybe it has something to do with TypeScript (or the lack of it?)

Add Capacitor v5 support

Hi!
Could you please update your plugin to make it compatible with Capacitor v5?
Thanks in advance.

Not working with insets

I got the insets, but when I paste this to the scss file, I cant get any result for my page, how is it working? Any help please

Swift warning on iOS 11

Hello,

I used this plugin on an Ionic app and my iOS build got a console warning upon calling SafeAreaController.injectCSSVariables() (see screenshot below). After a quick Google search, this seems like a problem with the Swift bindings for the plugin: any UI operations must be forced to run on the main thread with DispatchQueue.main.sync (or .async) - see this issue's answer for an example on how to fix it.

Just to make it clear, the issue doesn't seem to break my build (the CSS variables still work as intended), but it seems to slow down the app's process for a few secs while the error is being thrown.

ios-bug

Seems like a relatively simple fix, but I never touched Swift before so I thought it was better to discuss this before attempting a PR. Here are my package versions, in case it's useful:

  • @ionic/angular: 6.4.2
  • @capacitor/core: 4.7.0
  • @angular/core: 15.1.0
  • @aashu-dubey/capacitor-statusbar-safe-area: 1.1.0

Grats for the great plugin and thanks, it's really useful and I hope you get to fix this minor issue soon!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.