birkir / react-native-carplay

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

Get it to run on existing project #53

Closed nixolas1 closed 3 years ago

nixolas1 commented 3 years ago

Hi, I've been trying to get carplay to work on an existing react native project, but it just crashes when i start the carplay app. ( same error as here https://github.com/birkir/react-native-carplay/issues/49 )

I tried creating a completely new RN project and using the example screens, but that crashes. When using the example project and the existing ios workspace file it works fine.

Not sure what the difference in a newly created RN project and the example project is, as the Appdelegate.m looks identical, and both are set to deployment target 14.1. Is there anything I am forgetting to do to get it to work?

Im on a normal macbook pro, Big Sur, and Xcode 12.5.1

nixolas1 commented 3 years ago

I figured out what the problem was. I was missing the entitlements that were defined in test2.entitlements. I only had carplay-charging. It seems com.apple.developer.carplay-maps is required as well.

coda1997 commented 3 years ago

I found the same issue. So, can we work around the limitation of the entitlement ?

nixolas1 commented 3 years ago

It seems there are big differences between the Map version of CarPlay and the EV-Charging version. Not only the entitlement, but the whole Appdelegate.m implementation needs to use TemplateSceneDelegate and WindowSceneDelegate to work.

Maybe add a note in the readme @birkir, for future EV-Charging users, that the implementation may vary from the suggested one in the readme :)

jqn commented 2 years ago

Strangely enough, this works on M1 macs running RN version 0.66.00 and I couldn't get it to work on version 0.64 or 0.63 except if I run it on an intel based mac

tomdye commented 2 years ago

It could well be a limitation of the CarPlay simulator then.

On 16 Oct 2021, at 12:17, Joaquin Guardado @.***> wrote:

Strangely enough, this works on M1 macs running RN version 0.66.00 and I couldn't get it to work on version 0.64 or 0.63 except if I run it on an intel based mac

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/birkir/react-native-carplay/issues/53#issuecomment-944899849, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGG25MYZQZC3SRZS7JSIJ3UHFNLHANCNFSM5AX24D7A. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.