Skip to content

CarPlay Support w/ llim1 base#1516

Open
APIUM wants to merge 31 commits intoUnicornsOnLSD:redesignfrom
APIUM:pr-1474-flutter-carplay
Open

CarPlay Support w/ llim1 base#1516
APIUM wants to merge 31 commits intoUnicornsOnLSD:redesignfrom
APIUM:pr-1474-flutter-carplay

Conversation

@APIUM
Copy link

@APIUM APIUM commented Jan 17, 2026

Adds CarPlay support using flutter_carplay package.

This PR is based on the work from llim1 #1474 adding the finishing touches to get it ready to merge.

Todo before merging

  • install dependencies & configure iOS project
  • basic now-playing screen
  • library tab: albums list
  • library tab: artists list
  • library tab: genres list
  • library tab: playlists list
  • library tab: tracks list
  • search tab (likely requires changes to flutter_carplay) - Replaced this with Siri support, this can come in a follow up PR
  • recently played tab - follow up PR
  • home tab?
  • support offline mode
  • replace static text with localizations
  • rich 'now-playing' screen inc. queue management + album art (likely requires changes to flutter_carplay) - follow up PR
  • now-playing icon on list entries - follow up PR

Known issues

Will cross off issues here once they are addressed.

  • flutter_carplay loads images from web URIs but file URIs are broken despite file paths being listed as supported
  • 'now-playing' screen has inconsistent behaviour on iOS simulator. Need build to physical hardware to test
  • 'now-playing' button in root tab view is missing the icon, despite being clickable
  • Translations
  • Extended CONTRIBUTING.md

Related Issues

Closes #24
Original PR #1474

@APIUM APIUM force-pushed the pr-1474-flutter-carplay branch 2 times, most recently from a7c7134 to b2a397f Compare January 17, 2026 03:58
Copy link

@llim1 llim1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, also a few notes:

  • known issue "flutter_carplay loads images from web URIs but file URIs are broken despite file paths being listed as supported" is marked as fixed but issue is still present in my environment. Some artwork shows a '?' image where visible
  • jellyfin api related changes not reviewed
  • siri search not tested

@APIUM
Copy link
Author

APIUM commented Jan 23, 2026

Thanks for the review @llim1

known issue "flutter_carplay loads images from web URIs but file URIs are broken despite file paths being listed as supported" is marked as fixed but issue is still present in my environment. Some artwork shows a '?' image where visible

I misunderstood this originally, I am now able to recreate it, when there were spaces encoded in the url it broke. I've added a fix for this.

@llim1
Copy link

llim1 commented Jan 31, 2026

Thanks for the review @llim1

known issue "flutter_carplay loads images from web URIs but file URIs are broken despite file paths being listed as supported" is marked as fixed but issue is still present in my environment. Some artwork shows a '?' image where visible

I misunderstood this originally, I am now able to recreate it, when there were spaces encoded in the url it broke. I've added a fix for this.

Confirmed, images issue is fixed. No further comments from me 👍

@Chaphasilor
Copy link
Collaborator

@APIUM @llim1 do any of you already have access to the entitlements? I think Logan hasn't created the developer account yet, but what about Algy?

@Chaphasilor
Copy link
Collaborator

@APIUM you mentioned on Discord that we can go back to using the upstream plugin instead of your fork, right?

@APIUM
Copy link
Author

APIUM commented Feb 1, 2026

@APIUM you mentioned on Discord that we can go back to using the upstream plugin instead of your fork, right?

Yep I’ll make this change in here

@APIUM
Copy link
Author

APIUM commented Feb 1, 2026

@APIUM @llim1 do any of you already have access to the entitlements? I think Logan hasn't created the developer account yet, but what about Algy?

I’m waiting on Apple to approve my personal account, they look about 3 days to ask for ID, and it’s been over a week since then. They say it’s a 2 day process…. I’m all set up in the team so I’ll be able to test very quickly once Apple approves.

@networkoctopus
Copy link

really looking forward to this in Finamp. Thanks for working on it!

Can I cheekily request having an instant mix button available on CarPlay. Would love if it was easy to start a good mix (especially for those who use the new audiomuse-ai backend).

@Haar
Copy link

Haar commented Feb 22, 2026

image

Just been running this PR locally on a Simulator before trying it out on actual Hardware. Quick question - what's the difference between Shuffle all and Instant Mix?

@APIUM
Copy link
Author

APIUM commented Feb 22, 2026

Just been running this PR locally on a Simulator before trying it out on actual Hardware. Quick question - what's the difference between Shuffle all and Instant Mix?

Hi @Haar thanks for having a look.

Shuffle all is just a standard shuffle of all the music in your library.
Instant Mix seeds a Jellyfin 'Instant Mix' with a random album from a list of 10. That list is made from 5 random albums, and 5 frequently played albums. I think this behavior will change as I think Chaphasilor is working on some Instant Mix functionality in the home screen redesign.

@networkoctopus see above for the current Instant Mix situation

Harr please let me know if you find a way to test on real hardware, I am having trouble with profiles and certificates. Still working this out and it's why this PR has stalled.

llim1 and others added 17 commits February 25, 2026 11:35
Add scene-based lifecycle support for flutter_carplay plugin:

- Fix UIApplicationSceneManifest preservation in built Info.plist
- Add scene configurations for main app and CarPlay
- Implement programmatic scene delegate configuration
- Create custom CarPlaySceneDelegate wrapper class

Status: App launches without crashes, CarPlay connects but shows
blank screen due to plugin delegate not being @objc accessible.
Make FlutterCarPlaySceneDelegate @objc accessible by modifying
plugin source to add @objc annotation. This allows iOS to find
the delegate class via NSClassFromString and properly instantiate
it for CarPlay scenes.

The modification is in pub cache at:
.pub-cache/hosted/pub.dev/flutter_carplay-1.2.1/ios/Classes/
FlutterCarplayPluginSceneDelegate.swift (line 24)

Change:
  class FlutterCarPlaySceneDelegate
To:
  @objc(FlutterCarPlaySceneDelegate)
  class FlutterCarPlaySceneDelegate

This fix enables full CarPlay functionality including template
rendering and Flutter communication via the plugin's event stream.
- Show login prompt on CarPlay when user is not authenticated
- Refresh CarPlay template automatically on login/logout
- Add tracks library view with shuffle all option
- Implement artist tracks fetching via direct API calls
- Wire up playback for artist top tracks and recently played
- Set artCacheFile extra for iOS Now Playing artwork display
Add method channel to sync playback state to MPNowPlayingInfoCenter
on iOS. This fixes CarPlay not reflecting play/pause state when
playback is started from the phone.

Workaround for audio_service not setting playbackState on iOS.
Pass null instead of string "null" when imageUri is unavailable to
prevent flutter_carplay from trying to load a non-existent asset.
Switch to APIUM/flutter_carplay fork which adds the @objc annotation
to FlutterCarPlaySceneDelegate. This is required for iOS to discover
the class via NSClassFromString when specified in the scene manifest.

Without this fix, CarPlay fails to initialize because the delegate
class cannot be instantiated at runtime.

Fork: https://github.com/APIUM/flutter_carplay
Add _isPushing guard to all CarPlay show*Template methods to prevent
duplicate template pushes when users tap navigation items quickly.

Also add CarPlay development documentation to CONTRIBUTING.md with
troubleshooting steps for when CarPlay doesn't appear in the simulator.

Committed at 08:46:31
APIUM added 11 commits February 25, 2026 11:35
- Shuffle All and Start a Mix buttons at the top
- Recent Plays section showing last played tracks from queue
- Recently Added section showing 3 most recent albums
- Offline mode support for all sections
Use similar list limitation to Android Auto of 250. Users should use search for now for large libraries, and we should update Jellyfin in the future to be able to get items by their first letter server side.
Enable voice commands like "Hey Siri, play [song/artist/album] on Finamp" for CarPlay. Uses SiriKit Media Intents to bridge to the existing Android Auto search logic.
Updated commit author/committer in fork to use proper email address.
- Extract CarPlay item limits to named constants
- Improve instant mix: use frequent + random albums instead of recent
- Fix lint warnings
- Remove verbose NSLog statements, keep error logs
- Fix minor code style issues
Also add alphabetical grouping to Tracks and Artists screens.
- Reset pubspec.lock to redesign base, add only flutter_carplay
- Remove unused RunnerDebug.entitlements
- Revert android_auto_helper.dart playFromMediaId signature
- Remove unused artCacheFile from queue_service.dart
@APIUM APIUM force-pushed the pr-1474-flutter-carplay branch from 525c5d6 to e053219 Compare February 25, 2026 00:48
Add smtc_windows prefix to avoid conflict with Flutter's new RepeatMode class.
- Fix Siri "not supported" error (add INPlayMediaIntentHandling)
- Parallelise CarPlay home screen loading
- Optimise instant mix (single track + continuous radio)
- Optimise shuffle all (reduced to 30 tracks)
- Pre-cache and deduplicate CarPlay cover art
@APIUM APIUM force-pushed the pr-1474-flutter-carplay branch from 694c91b to 0488123 Compare March 4, 2026 10:42
- Add application(_:handlerFor:) intent dispatch method
- Change response code from .handleInApp to .success
- Add INSupportedMediaCategories to Info.plist files
- Remove unused INAddMediaIntent
- Use fast 30-track shuffle for Siri (matching CarPlay)
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.

6 participants