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

Return MPRemoteCommandHandlerStatus required for iOS 13 #158

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

yoojene
Copy link

@yoojene yoojene commented Aug 29, 2019

PR summary

Apple API docs state that functions with MPRemoteCommandEvent params should return MPRemoteCommandHandlerStatus .

Current implementation has these as returning void, which is crashing apps using this plugin in iOS 13.

PR returns MPRemoteCommandHandlerStatusSuccess in all actions of this type

Issue(s) related

#157

Steps to test

  1. Call MusicControls.create({.. on iOS 13 results in app crash
  2. Update code with this PR
  3. Call MusicControls.create({.. on iOS 13 results in app not crashing

@drewrygh
Copy link

drewrygh commented Sep 5, 2019

Thanks for putting this together. I ran into this issue as well, and can confirm that it fixes it.

@fdambrosio
Copy link

thank you! Will be added to the master?

@JumBay
Copy link

JumBay commented Sep 23, 2019

@yoojene @drewrygh as I can see, you've managed to make it works on iOS 13.
Could you mind to share a working sample code?
I've tried by copy/paste the example in the readme but no luck. I don't get any error, it just doesn't work. I've tried with your branch too, but again no luck.

Thanks

@dupphil
Copy link

dupphil commented Sep 26, 2019

@yoojene it works for me. Thanks a lot

@MarcelvanGastel
Copy link

Yes! It works! Thanks a lot!

@jerodfritz
Copy link

I can confirm this fixes the crashing on iOS13 in my Ionic app by doing the following:

ionic cordova plugin remove cordova-plugin-music-controls
ionic cordova plugin add git+https://github.com/homerours/cordova-music-controls-plugin.git#90e3fe8838c3151bd8e51901079eb34740ec87c9ionic

@JumBay
Copy link

JumBay commented Oct 5, 2019

@fdambrosio I've managed to make it works. I'm using this plugin to control a remote player. I didn't know the device has to play something to make it works (on iOS).

@tbergeron
Copy link

Is this project dead? Does anybody maintain it?
Will this get merged in the foreseeable future?

@JumBay
Copy link

JumBay commented Oct 8, 2019

@tbergeron yes, see the readme.

Does anyone manage to make the callbacks work on the create method? it seems to be never called

@yoojene
Copy link
Author

yoojene commented Oct 14, 2019

Noticed this PR was suddenly not working , have added MPRemoteCommendHandlerStatus return values for skipForwards and skipBackwards actions

For anyone still trying, after commit 75179c8 the plugin works for me on iOS 13.1.2

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.

9 participants