birkir / react-native-carplay

CarPlay with React Native
https://birkir.dev/react-native-carplay/
MIT License
656 stars 108 forks source link

implemented passing of window layout information to the JS side #127

Closed susonthapa closed 1 year ago

susonthapa commented 1 year ago

What has changed?

Right now there is no way to access the information about the connected HeadUnit display. The ReactNative's dimension API gives the information about the phone, not the HeadUnit. The layout information is important when we want to implement animations when using a custom map component.

This PR exposes that information through the didConnect event. The exposed property are width, height, and scale.

I'm not a professional Objective-C developer. Please let me know if there is something wrong with the implementation.