{"id":20393406,"url":"https://github.com/birkir/react-native-carplay","last_synced_at":"2025-05-14T09:06:25.333Z","repository":{"id":37677567,"uuid":"177710514","full_name":"birkir/react-native-carplay","owner":"birkir","description":"CarPlay with React Native","archived":false,"fork":false,"pushed_at":"2025-02-13T10:31:02.000Z","size":11213,"stargazers_count":724,"open_issues_count":54,"forks_count":120,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-05-12T07:43:19.572Z","etag":null,"topics":["auto","carplay","native","react","react-native","typescript"],"latest_commit_sha":null,"homepage":"https://birkir.dev/react-native-carplay/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/birkir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-26T03:45:34.000Z","updated_at":"2025-05-07T13:04:51.000Z","dependencies_parsed_at":"2024-02-16T11:25:26.968Z","dependency_job_id":"9504f705-4a0e-4cf1-aeab-f141ab10db85","html_url":"https://github.com/birkir/react-native-carplay","commit_stats":{"total_commits":183,"total_committers":26,"mean_commits":7.038461538461538,"dds":0.6338797814207651,"last_synced_commit":"c402b53ae1f01a08ac707c1f4c3acbfa3449f3a4"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkir%2Freact-native-carplay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkir%2Freact-native-carplay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkir%2Freact-native-carplay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkir%2Freact-native-carplay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/birkir","download_url":"https://codeload.github.com/birkir/react-native-carplay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto","carplay","native","react","react-native","typescript"],"created_at":"2024-11-15T03:48:36.984Z","updated_at":"2025-05-14T09:06:25.307Z","avatar_url":"https://github.com/birkir.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native CarPlay and Android Auto\n\nExtend your React Native applications to car infotainment systems with `react-native-carplay`. Now supporting both Apple CarPlay and Android Auto.\n\n### CarPlay\n\n![CarPlay Demo](https://media.giphy.com/media/Ffa4hukA3YMLh6U8fl/giphy.gif)\n\n### Android Auto\n\n![Android Auto Demo](https://media.giphy.com/media/jAml2yehNwQ1mjFnxK/giphy.gif)\n\n## Discord Channel\n\nCome join us on our discord channel: https://discord.gg/b235pv6QHM\n\n## Minimum version target requirements\n\n- Minimum iOS target is 14\n- Minimum Android target is 30\n- _No Expo support due to Scenes_\n\n## Installing\n\nAdd `react-native-carplay` to your project:\n\n```bash\n# via yarn\nyarn add react-native-carplay --save\n\n# or via npm\nnpm install react-native-carplay --save\n```\n\n### CarPlay Specific Setup (iOS)\n\nRefer to the [CarPlay Documentation](/CarPlay.md#installing) for detailed setup instructions for iOS.\n\n### Android Auto Specific Setup\n\nRefer to the [Android Auto Documentation](/AndroidAuto.md#installing) for detailed setup instructions for Android.\n\n## Basic Usage\n\nThis is the most basic example of how to use this library. Create templates and then push/pop them to the navigation stack natively.\n\n```jsx\nimport { CarPlay, GridTemplate } from 'react-native-carplay';\n\n// Creates your template in the car app on the fly.\nconst template = new GridTemplate({\n  title: 'Hello, World',\n});\n\n// Sets the root template for your car app.\nCarPlay.setRootTemplate(template);\n```\n\nFor more examples and detailed API usage, refer to [CarPlay Usage](/CarPlay.md#usage) and [Android Auto Usage](/AndroidAuto.md#usage).\n\n## CarPlay API\n\nFor more details on the CarPlay API, refer to the CarPlay API Docs.\n\n### CarPlay.setRootTemplate\n\nSets the root template of CarPlay.\nThis must be called before running any other CarPlay commands. Can be called multiple times.\n\n```tsx\nCarPlay.setRootTemplate(template, /* animated */ false);\n```\n\n### CarPlay.pushTemplate\n\nPushes a new template to the navigation stack.\n**Note** you cannot push the same template twice.\n\n```tsx\nCarPlay.pushTemplate(template, /* animated */ true);\n```\n\n### CarPlay.popTemplate\n\nPop currently presented template from the stack.\n\n```tsx\nCarPlay.popTemplate(/* animated */ false);\n```\n\n### CarPlay.popToTemplate\n\nPop currently presented template from the stack to a specific template. The template must be in the stack.\n\n```tsx\nCarPlay.popToTemplate(template, /* animated */ false);\n```\n\n### CarPlay.popToRoot\n\nPop the stack to root template.\n\n```tsx\nCarPlay.popToRoot(/* animated */ false);\n```\n\n### CarPlay.presentTemplate\n\nPresent a template modally (Alerts and ActionSheets)\n\n```tsx\nCarPlay.presentTemplate(template, /* animated */ true);\n```\n\n### CarPlay.dismissTemplate\n\nDismisses the current presented template\n\n```tsx\nCarPlay.dismissTemplate(/* animated */ true);\n```\n\n### CarPlay.registerOnConnect\n\nRegister event listener for when CarPlay connects.\n\n```tsx\nCarPlay.registerOnConnect(() =\u003e {\n  console.log('CarPlay connected');\n  CarPlay.setRootTemplate(/* template */);\n});\n```\n\n## Example App\n\nBrowse the example app source code [here](/apps/example/).\n\nTo run the example app:\n\n```bash\n# Clone the repository\ngit clone https://github.com/birkir/react-native-carplay.git\n\n# Navigate to the example directory\ncd react-native-carplay/apps/example\n\n# Install dependencies\nyarn install\n\n# Install Cocoapods\nnpx pod-install\n\n# Run the iOS or Android app\nyarn run ios|android\n\n# Run the Metro server\nyarn run start\n```\n\n## Declarative vs. Imperative\n\nThis library is a wrapper around the template-based native CarPlay and Android Auto SDKs.\n\nWe provide imperative APIs, as native templates are not designed for continuous updates, which would conflict with car display regulations. We expose limited template update capabilities [as allowed](https://developer.android.com/static/training/cars/Android%20for%20Cars%20App%20Library%20design%20guidelines.pdf#page=11\u0026zoom=100,0,0) by each platform.\n\nDeclarative React is available for map screens where UI freshness is unrestricted.\n\nWe are open to expanding our declarative APIs in response to community feedback and where it aligns with platform constraints.\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines and code of conduct.\n\nA big thank you to all our contributors!\n\n![List of contributors](https://contrib.rocks/image?repo=birkir/react-native-carplay)\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirkir%2Freact-native-carplay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirkir%2Freact-native-carplay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirkir%2Freact-native-carplay/lists"}