Closed shubhadeep-foodhub closed 8 months ago
I am experiencing the same issue, I am myself using the the latest version of you library. I followed the readme, but without any result, I am not seeing my app in the simulator and I cannot connect to carPlay. Any clue ?
I am not able to find any solutions till now. can anyone help with some proper/latest steps? @birkir @DanielKuhn
I don't have any experience with older versions of this package, so I'm unable to help here. Using the current example works fine for me:
const [carPlayConnected, setCarPlayConnected] = useState(CarPlay.connected);
useEffect(() => {
function onConnect() {
setCarPlayConnected(true);
}
function onDisconnect() {
setCarPlayConnected(false);
}
CarPlay.registerOnConnect(onConnect);
CarPlay.registerOnDisconnect(onDisconnect);
return () => {
CarPlay.unregisterOnConnect(onConnect);
CarPlay.unregisterOnDisconnect(onDisconnect);
};
});
@DanielKuhn Thanks for the reply. Can you please let me know whether I test this using a carplay simulator and an iPhone simulator as I don't have an iPhone. Are there any other steps other than the readme? actually, the app is not showing on the carplay simulator.
@shubhadeep-foodhub run your app on Simulator.app, open a CarPlay window (via I/O > External Displays) and launch the app there. Once the app opens on CarPlay the onConnect
method is called.
If your app doesn't show up at all in the CarPlay window, then you probably haven't set an entitlement in Xcode, indicating that your app supports CarPlay.
@DanielKuhn Thank you for the support. The App is running properly after setting the proper path in Code Signing Entitlements.
Aahh, will try the Entitlements tip and then update my posted issue 🤞
I am trying to test the possibility of this library in our existing app.
as we are still supporting iOS 13, I am trying to use the 1.3.1 version of this library and following the steps written in the readme and examples associated with it. for testing, I am using iPhone 15 simulator and car play simulator. but in the below code, CarPlay.onConnect is not producing any results and the app is not showing in the simulator. can anyone please let me know what I am doing wrong?