A cordova plugin to get the size of the iPhone X safe area
npm install cordova-plugin-safeareaA cordova plugin to get the size of iPhone X safe area.
```
cordova plugin add cordova-plugin-safearea
- iOS
`js
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.plugins.safearea.get(successCallback, errorCallback);
}
function successCallback(result) {
console.log(result);
}
`
The plugin returns a JSON object with the screen sizes.
Return values:
* top <Number> − safe area top in pixelsbottom` <Number> − safe area bottom in pixels
*
cordova-plugin-safearea is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.