-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Refactoring/convert to swift #228
base: swift-implementation
Are you sure you want to change the base?
Refactoring/convert to swift #228
Conversation
To enable/disable remote commands easily
# Conflicts: # ios/Classes/AudioServicePlugin.m
Awesome! I'll give it a review in the morning. |
FYI |
I really like your code in particular, and that you've filled in some missing functionality in respecting the Let me know, and otherwise I'd be happy to also have a crack at it. |
Hi @ryanheise |
Hello @ryanheise and @MohamedAbdallah-14 I ran into another bug using the existing obj-c implementation and switched to this version to see if it solved it. Unfortunately, it didn't, but here is what I had to add to the obj-c version to fix it. Basically clearing state & such on [MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = nil;
state = nil;
position = nil;
updateTime = nil;
speed = nil;
artwork = nil;
mediaItem = nil;
queue = nil;
startResult = nil;
result(@YES); It looks like we will be moving towards swift in the near future, so if this could be added to the "TOS-approved" implementation that'd be great. I'm happy to do that as well once the this initial issue is figured out. One more thing - And @ryanheise if I should create a PR with these changes for the current implementation, let me know. |
Hi @DGempler , thanks for finding another issue. Have you created an issue for it? Probably what I'll do is create a swift branch to allow me to collaborate with @MohamedAbdallah-14 on the swift implementation, and then in the meantime you could still submit PRs in objective c for the current implementation. If the swift code is merged first, at least your PR would still be a helpful record of what the fix was, so feel welcome to still submit one if you like. To the logging question, I've been using |
@ryanheise yes just created the issue with linked PR: #237. Regarding the use of |
@DGempler Ah, sorry I understand now. Yes, print does not show on the device console, but NSLog does, so I agree it's a good idea to use NSLog. Thanks for making the additional PR also. |
Any preview for when this will be merged into master? I wanted to make updates for the iOS but Im not sure if I should waste time into swift or C |
As mentioned in Issue #218
Converted Objective c code to swift
Loading image from cache working
Added Control actions Feature (Play, Pause ... etc) in control center