ShelfPlayer icon indicating copy to clipboard operation
ShelfPlayer copied to clipboard

[Feature Request] Native CarPlay support/app

Open tehguitarist opened this issue 1 year ago • 40 comments

Playback on CarPlay of course works totally fine if a book is “queued” on the phone, or started from the phone (skipping, play/pause, art and name, etc. all pull through), but it’d be great to have a CarPlay interface to start a book from the car touchscreen.

Great app! Love having a native option for ABS written in Swift.

tehguitarist avatar Jan 17 '24 23:01 tehguitarist

👍 I have already requested car play entitlements from apple, but I have absolutely no idea if or when I will get them. In regards to this apple is truly a blackbox. Don't get you hopes up, but it might be coming

rasmuslos avatar Jan 18 '24 13:01 rasmuslos

Do you have the app in test flight? I have heard you need so many users in test flight before they well look at it. Again just stuff I have heard.

woolmonkey avatar Feb 16 '24 11:02 woolmonkey

Do you have the app in test flight? I have heard you need so many users in test flight before they well look at it. Again just stuff I have heard.

I have actually received the entitlements for AmpFin, without any users in a TestFlight. There are also some issues with app review, so this may take some time

rasmuslos avatar Feb 16 '24 12:02 rasmuslos

Do you have the app in test flight? I have heard you need so many users in test flight before they well look at it. Again just stuff I have heard.

I have actually received the entitlements for AmpFin, without any users in a TestFlight. There are also some issues with app review, so this may take some time

Oddly enough I applied for CarPlay entitlements for my fork of Audiobookshelf yesterday and was approved within 24 hrs. I gave them very generic information ("an audiobook player app with basic playback controls"). I didn't give the name of the app, and I don't have the fork even registered yet in my developer account.

sevenlayercookie avatar Feb 17 '24 00:02 sevenlayercookie

Are you releasing the fork?

woolmonkey avatar Feb 17 '24 01:02 woolmonkey

Are you releasing the fork?

I haven't even started on the CarPlay part, but yes eventually will publish it and hopefully get it merged into the main Audiobookshelf branch.

sevenlayercookie avatar Feb 17 '24 01:02 sevenlayercookie

If you are talking about the official app, there is already someone doing an implementation, I would suggest talking to them in #dev-chat (ABS-Discord)

rasmuslos avatar Feb 17 '24 08:02 rasmuslos

I have received the entitlements and started to work on the CarPlay app, but this might take some time to finish because you cannot program CarPlay apps in SwiftUI, the language I primarily use.

Also I don't think it is possible to side-load a CarPlay app, or at least quite hard, because you have to have a Apple-Developer account and request the entitlements yourself.

rasmuslos avatar Feb 23 '24 08:02 rasmuslos

Actually it is quite easy to program a CarPlay app, because all the views are pre-made from apple. You just have to provide the data, which is quite easy, at leas when you do everything on the main thread. I have no idea how this will work in practice, I don't have a CarPlay enabled car, but I am very curious.

If we are lucky the app might get approved soon, after over two months someone actually bothered to review it today, but because they were to stupid find the background audio playback, something that is quite baffling to me, it might take some additional time...

Bildschirmfoto 2024-02-23 um 17 19 45 Bildschirmfoto 2024-02-23 um 17 19 42

rasmuslos avatar Feb 23 '24 16:02 rasmuslos

Nice! I have CarPlay entitlements for a different audiobook app and Apple Developer account -- I wonder if I can apply my entitlements to be able to use your CarPlay implementation? Not really sure how all of that works -- I'm brand new to iOS app development.

sevenlayercookie avatar Feb 24 '24 08:02 sevenlayercookie

Nice! I have CarPlay entitlements for a different audiobook app and Apple Developer account -- I wonder if I can apply my entitlements to be able to use your CarPlay implementation? Not really sure how all of that works -- I'm brand new to iOS app development.

The entitlement is tied to a bundle identifier, so you would have to reuse the same one, but it should work

rasmuslos avatar Feb 24 '24 11:02 rasmuslos

Nice! I have CarPlay entitlements for a different audiobook app and Apple Developer account -- I wonder if I can apply my entitlements to be able to use your CarPlay implementation? Not really sure how all of that works -- I'm brand new to iOS app development.

The entitlement is tied to a bundle identifier, so you would have to reuse the same one, but it should work

I got it working; great start so far. I am using this as my daily driver for in car Audiobooks, as yours is the only app that supports both CarPlay and Audiobookshelf. Siri worked extremely well too. Is it only for offline books so far?

sevenlayercookie avatar Feb 27 '24 19:02 sevenlayercookie

Yes, I will implement an online mode in the future, but I am not yet sure how I should approach some things.

rasmuslos avatar Feb 28 '24 06:02 rasmuslos

Nice! I have CarPlay entitlements for a different audiobook app and Apple Developer account -- I wonder if I can apply my entitlements to be able to use your CarPlay implementation? Not really sure how all of that works -- I'm brand new to iOS app development.

The entitlement is tied to a bundle identifier, so you would have to reuse the same one, but it should work

I got it working; great start so far. I am using this as my daily driver for in car Audiobooks, as yours is the only app that supports both CarPlay and Audiobookshelf. Siri worked extremely well too. Is it only for offline books so far?

Just out of curiosity, does Siri work with podcasts / episodes, too?

rasmuslos avatar Feb 28 '24 06:02 rasmuslos

I don't have any podcasts on my server, but I'm happy to load one and report back.

sevenlayercookie avatar Feb 28 '24 18:02 sevenlayercookie

I don't have any podcasts on my server, but I'm happy to load one and report back.

Thanks!

rasmuslos avatar Feb 28 '24 21:02 rasmuslos

I don't have any podcasts on my server, but I'm happy to load one and report back.

Thanks!

Was not able to get a podcast to play using Siri, either by referencing the name of the podcast or the specific episode name. It does appear in the list and is playable by tapping the episode in the list.

sevenlayercookie avatar Feb 29 '24 03:02 sevenlayercookie

This may be redundant because it looks like the app is finally getting reviewed (hopefully it's not another three months between reviews anyway), but was there an easy way to disable CarPlay in the current build? Disabling Siri was easy, but I didn't find an obvious way to disable CarPlay (so I couldn't make a personal build as I'm not sideloading).

Worst case is I'll build a pre-CarPlay version for use until it hits the App Store.

tehguitarist avatar Feb 29 '24 20:02 tehguitarist

This may be redundant because it looks like the app is finally getting reviewed (hopefully it's not another three months between reviews anyway), but was there an easy way to disable CarPlay in the current build? Disabling Siri was easy, but I didn't find an obvious way to disable CarPlay (so I couldn't make a personal build as I'm not sideloading).

Worst case is I'll build a pre-CarPlay version for use until it hits the App Store.

The app is actually now, but I sadly have to clear some things with my tax councilor first. I really hope I can release the app soon, but I don't want to get into any legal trouble. I am still committed to continue providing free ipas for anyone that wants to side load the app.

What do you mean by you could not create a personal build? Does Xcode refuse to let you build the project? Can you provide the error message? If Xcode actually throws an error I would have to do some digging to find out how this might be resolved, because disabling Siri is actually done on a code level, while CarPlay is enabled through entitlements received by Apple and managed by Xcode.

Also you don't have to manually disable Siri support, it is sufficient to comment out the ENABLE_ALL_FEATURES compiler options in the Base Xcode config file (https://github.com/rasmuslos/ShelfPlayer?tab=readme-ov-file#sideload).

rasmuslos avatar Feb 29 '24 21:02 rasmuslos

Not a huge deal, When I go to build, even with the ENABLE_ALL_FEATURES flag removed from the compilation settings/commented out in base.xconfig it doesn't want to provision. If the app is likely to come out soonish anyway, not a stress in the world. If I delete the Siri section under Signing & Capabilities, I stop getting Siri errors, and just the CarPlay ones. Screenshot 2024-03-01 at 11 57 24 am

Screenshot 2024-03-01 at 11 56 21 am Screenshot 2024-03-01 at 11 56 41 am

Not worth digging too much into, just worth mentioning unless I'm missing something in the build settings.

tehguitarist avatar Mar 01 '24 00:03 tehguitarist

Interesting, I thought this might work... There is nothing wrong on your end. I think I can also change the entitlements using the Xcode-config, but the app should get released soon™️.

rasmuslos avatar Mar 01 '24 07:03 rasmuslos

CarPlay seems to be working great. One thing I did notice that steering wheel controls on my car (ford focus) doesn’t seem to do anything. On Spotify it skips the song, and on other apps I’ve had it skip 30 seconds. Not sure if this is just a listener, but thought it was worth mentioning.

tehguitarist avatar Mar 25 '24 10:03 tehguitarist

CarPlay seems to be working great. One thing I did notice that steering wheel controls on my car (ford focus) doesn’t seem to do anything. On Spotify it skips the song, and on other apps I’ve had it skip 30 seconds. Not sure if this is just a listener, but thought it was worth mentioning.

This does happen with wireless headphones, too. The problem is that the app only registeres skip not seek commands. If I remember correctly registering seek commands leads to some undesired behavior, but I can look into it.

rasmuslos avatar Mar 25 '24 10:03 rasmuslos

It’s not a big deal, the touch screen buttons work and skipping intervals whilst driving isn’t all that common (for me at least). Just thought it was worth mentioning.

tehguitarist avatar Mar 25 '24 10:03 tehguitarist

It’s not a big deal, the touch screen buttons work and skipping intervals whilst driving isn’t all that common (for me at least). Just thought it was worth mentioning.

It was actually quite easy to fix (at least I hope it works in cars, too). If you register handler for the seek commands but don't enable them they still fire when you use your headphones (or your car) but do not show up anywhere.

Now you can use your headphones to seek, too!

rasmuslos avatar Mar 25 '24 10:03 rasmuslos

Not a huge deal, but on the most recent AppStore build ff/rw physical buttons in the car doesn’t skip forward or back in CarPlay. Touchscreen buttons work of course. Not a big deal, just letting you know.

tehguitarist avatar Apr 22 '24 23:04 tehguitarist

Not a huge deal, but on the most recent AppStore build ff/rw physical buttons in the car doesn’t skip forward or back in CarPlay. Touchscreen buttons work of course. Not a big deal, just letting you know.

Did it work before?

rasmuslos avatar Apr 23 '24 08:04 rasmuslos

Never when I’ve tried before. Just reporting back after the headphone fix was implemented

tehguitarist avatar Apr 23 '24 08:04 tehguitarist

Do the buttons work in other apps? If they do this is quite curious, because I am not aware of any other events that could be emitted...

rasmuslos avatar Apr 23 '24 10:04 rasmuslos

My previous statement was completely wrong: There are actually three events: seekBackwardCommand skipBackwardCommand and previousTrackCommand. Registering all of them should fix this.

rasmuslos avatar Apr 23 '24 10:04 rasmuslos