Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music controls don't work for iOS #460

Open
zac-garby opened this issue Jun 26, 2021 · 20 comments
Open

Music controls don't work for iOS #460

zac-garby opened this issue Jun 26, 2021 · 20 comments
Labels

Comments

@zac-garby
Copy link

The music app can't control the iOS Music app. I'm assuming this is just not implemented (yet?), but I thought I'd make an issue in case I'm doing something wrong or I need to set something up in order for it to work.

Otherwise, if it's not implemented yet, are there plans for iOS music controls in the future?

@thefenriswolf
Copy link

Which companion app are you using?

@Avamander
Copy link
Collaborator

BLE standard doesn't contain one for music control (BT Classic does, but we don't have that), such functionality has to be implemented by the companion app.

@zac-garby
Copy link
Author

ah that makes sense. i'm using nRF Connect, but only because afaik it's the only one for iOS

@JF002
Copy link
Collaborator

JF002 commented Jun 30, 2021

Indeed, NRFConnect is a generic app that allows to connect to devices, browse their characteristic, debug the connection,... but it does not provide any higher level functionalities like music control, navigation or notifications.
Unfortunately, I think there's no companion app compatible with PineTime / InfiniTime on iOS for now. Someone want to fill that gap?

@zac-garby
Copy link
Author

if i had more time i'd definitely look into making one. also that explains what the notifications section is for, i take it that the watch can show your phone notifications? if so, i'm not sure if iOS actually allows apps to look at systemwide notifications, i would guess not?

@Avamander
Copy link
Collaborator

i'm not sure if iOS actually allows apps to look at systemwide notifications, i would guess not?

You can maybe find the Pebble app's App Store description and see if it implemented it. It might actually be doable, but I haven't personally paid attention.

@JF002
Copy link
Collaborator

JF002 commented Jul 2, 2021

I would be surprised if iOS doesn't allow notifications to be sent to any smartwatch, but I don't know much about the Apple world so...

@zac-garby
Copy link
Author

yeah looks like it's possible actually, i was just thinking how obsessed apple is with privacy recently

@tapresle
Copy link

tapresle commented Jul 11, 2021

Pebble used to do notifications on the original Pebble, I never had a Pebble Time or the others so I can't speak to the other functionality. I've actually recently received my InfiniTime and made a quick and dirty app to set the time via iOS. I'll see what's involved in getting notifications and basic music controls working but can't guarantee any timeline.

EDIT: I've looked into it a bit today, iOS is extremely locked down now compared to the days of Pebble so I believe their old way of getting all notifications to the watch has been blocked, @zac-garby if you have a lead send it my way. I've been able to get Apple Music connected to my app to send music info TO the InfiniTime, but not control back yet. I use Spotify personally so I'll see what extra is included to get that hooked up, looks like I need to get into the Spotify SDK and all that.

@tapresle
Copy link

I've done some more digging and it looks like Apple Media Service needs to be implemented on the InfiniTime firmware. Similarly, ANCS for notifications. If there's someone more comfortable with editing the firmware to implement those I'd be happy to test, I don't quite have the tools I need to edit firmware yet and it's been almost a decade since I've looked at C/C++ code 😆

@Avamander Avamander added feature request help wanted Extra attention is needed labels Oct 2, 2021
@computergeek125
Copy link

computergeek125 commented Nov 24, 2021

Was reminded this issue exists today - I have an iPhone, an unsealed dev watch, a Mac, and probably enough Unix/Linux machines to figure out how to compile Infinitime. I can also help test, but my C/C++ isn't probably up to par for actually writing this

@TheAwesome98-Real
Copy link

Old issue but InfiniLink works, but only with Apple Music so far. There was an issue saying system wide media support is coming soon iirc

@JF002
Copy link
Collaborator

JF002 commented Jan 1, 2022

Thanks for the info! My understanding is that it works only with the Apple Music app, and this is a limitation of iOS.
Other apps would need other BLE services and characteristics to be implemented in InfiniTime.

@JF002 JF002 closed this as completed Jan 1, 2022
@tapresle
Copy link

tapresle commented Jan 1, 2022 via email

@JF002
Copy link
Collaborator

JF002 commented Jan 1, 2022

I closed it because there's nothing we can do in InfiniTime to make iOS compatible with the music control API implemented in InfiniTime.

Ok, I thought this was a "bug" issue, but, as it is a "feature request", I guess I can re-open it, in case someone is willing to implement whatever is necessary for iOS to work correctly :-)

@JF002 JF002 reopened this Jan 1, 2022
@tapresle
Copy link

tapresle commented Jan 1, 2022 via email

@JF002
Copy link
Collaborator

JF002 commented Jan 2, 2022

I think most of the active developers in InfiniTime do not own an Apple device, and that's probably the main reason why no one has already tried to implement the apple specific protocole.

That would be awesome if you could help on that topic! Feel free to ask for help here on in the community chat rooms if needed :)

@jrmolin
Copy link

jrmolin commented Apr 12, 2022

I have a PineTime, a lot of C/C++ experience, a fair number of Apple products, a lot of GNU/Linux experience, and some free time. I would be happy to look into this, but I am a little hazy on this code base. Could someone point me at the specifications I would need to hit for this to work?

@minacode
Copy link
Contributor

minacode commented Jul 2, 2022

Hi, I tried implementing ANCS once. It seems that AMS has the same implementation issue Source:

Due to the nature of iOS, the AMS is not guaranteed to always be present. As a result, the MR should look for and subscribe to the Service Changed characteristic of the GATT service in order to monitor the potential publishing and unpublishing of the AMS at any time.

Right now, Infinitime does not have support for BLE services that can appear and disappear at any time. Sadly, Apple's Services build heavily on this mechanic.
Thus, implementing the GATT service would be a good start.
Sadly, I am writing my thesis and don't have time for this right now.

With ANCS and AMS running, the watch would have full support for iOS for everything but navigation, I assume.

@cyberneel
Copy link

I got ANCS working and opened a PR recently, #2217. The watch seems to be able to reconnect to te service on its own and everything works. I think I may be able to implement AMS as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants