react-native-static-safe-area-insets | React Native package that exposes the Safe Area | iOS library
kandi X-RAY | react-native-static-safe-area-insets Summary
kandi X-RAY | react-native-static-safe-area-insets Summary
React Native package that exposes the Safe Area insets as constants (iOS and Android notch are supported).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Retrieve the safe areas insets
- Get safe area insets
- Gets the constants for all areas that are defined for this area
- Create JS module classes
- Create native modules
- Create view managers
react-native-static-safe-area-insets Key Features
react-native-static-safe-area-insets Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-static-safe-area-insets
QUESTION
I have a React Native (0.59.8) app that works perfectly fine on simulator, perfectly fine when deployed to device through Xcode, but unresponsive when distributed over TestFlight for about 3 minutes on app start only if the user hasn't logged in.
Here is what happens:
- I install my app through TestFlight
- Open the app.
- There is a 'get started' button on welcome page, that takes the user to the login screen. I tap that button
- Nothing happens for about 2-3 minutes
- App goes to the login screen and everything starts working perfectly.
Some observations:
- This happens only on TestFlight archive builds, it doesn't happen on simulator or when deployed through Xcode > Run.
- This happens on multiple physical devices (though both a iPhone X, we currently don't have any other devices to test).
- When app is in that "crashed" state, rotating my phone rotates everything perfectly to landspace orientation. i.e., the app is actually running and responding/layouting correcty to rotations. Though, the tab bar icon layout atht the bottom doesn't change correctly to the landscape/portraint orientation.
- If the user isn't logged in inside my app, and I kill the app and relaunch, same problem occurs.
- Once the user is logged in everything works.
- If I kill the app and relaunch when the user is logged in, I get my homepage that is inside a tab bar and has some tappable views. The scroll view scrolls perfectly and smoothly BUT tab bar buttons and tappable links don't work. When I let it stay on for a few minutes, it crashes with the following log from my iPhone in
Console.app
:
-
...ANSWER
Answered 2019-Jun-26 at 10:33After clarifying the problem (that it hangs only in debug builds where debugger is not attached) it was more clear. I've read react native ios application crash if remote debug is not enabled and it turns out that it was exactly the same: logs were causing JS thread to hang. They were routed to a debugger if attached with no issue but when there wasn't a debugger it bloated the console.
I've added babel-plugin-transform-remove-console script to my dev dependencies which only triggers on release mode, and the problem is gone. (It still happens if I do NOT have a debugger attached on a debug build, but I always have one attached while developing anyway)
EDIT: It seems that after upgrading to React Native 0.60 (and also some structural changes) babel-plugin-transform-remove-console
stopped working for no apparent reason or error. I've added the following code to my app's main index.js
to remove logging from production builds:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-static-safe-area-insets
You can use react-native-static-safe-area-insets like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the react-native-static-safe-area-insets component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page