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

Fix no rendered content on CarPlay #474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tommynordli
Copy link

@tommynordli tommynordli commented Feb 28, 2024

Summary

When having the app opened on CarPlay only, there are no safe area insets, resulting in the provider just returning null. Just returning the children instead does the trick. This should fix #135

@jacobp100
Copy link
Collaborator

I don’t think this is the right fix. Why aren’t there insets?

@tommynordli
Copy link
Author

I didn't spend too much time digging into it so I'm not sure exactly why, but I don't think safearea insets on CaPlay aren't really neccessary as it's mostly template based. This only happens when launching the app from CarPlay with the app closed on the device btw, not if the app is initialized on the phone first.

@jacobp100
Copy link
Collaborator

We can't merge this change because it'll cause excessive renders. If you figure out why the insets aren't getting set, we can look at merging something that fixes that issue

@janicduplessis
Copy link
Member

Yea, we need to keep the current behaviour of rendering null until we receive the first inset events. Is there a way to know it is carplay from JS? Or we could manually send an insets event with 0 insets if carplay from native code.

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.

SafeAreaProvider doesn't render content if the app is launched from CarPlay
3 participants