An Apple SDK Media Player object that responds to remote control events sent by external accessories and system controls.
Questions tagged [mpremotecommandcenter]
74 questions
1
vote
1 answer
MPRemoteCommandCenter disabled all controls
Hello dear colleagues i need your help. When i add MPChangePlaybackPositionCommand all my controls (Play/Pause/Rew/Next track on lockscreen) has been disabled automatically. Slider of Playback on lockscreen works perfectly but i can not push no one…

Genevios
- 1,115
- 1
- 16
- 29
1
vote
1 answer
How to detect if AirPlay is active before playing a video with AVPlayer?
I was using the following code to detect whether or not AirPlay is the current selected route:
let airPlayActive = AVAudioSession
.sharedInstance()
.currentRoute
.outputs
.first?
.portType == .airPlay
print("AirPlay active:…

alanpaivaa
- 1,959
- 1
- 14
- 23
1
vote
1 answer
Why remote command center not show in simulator?
I wanna show command center in lock screen but it work on real device and not working on simulator.

Yusef.Naser
- 123
- 1
- 6
1
vote
2 answers
How to prevent iOS app from being suspended
I have an iOS app that needs to track user's geolocation for a research project. However, the app gets automatically suspended by the iOS after a few hours and the geolocation tracking stops working.
Geofencing is not sufficient for my case as it's…

Avery235
- 4,756
- 12
- 49
- 83
1
vote
0 answers
nextTrackCommand and seekForwardCommand are both called at the same time
It seems that when I press "next" on control center when playing something (simulator or device), both nextTrackCommand and seekForwardCommand are getting called.
Both functions are enabled, but it doesn't make sense that both get called upon just…

gerbil
- 859
- 7
- 26
1
vote
1 answer
Display Nowplaying item meta in lock screen without playing media on phone
I am writing an app in objective-c and have problems with MPNowPlayingInfoCenter and MPRemoteCommandCenter.
The app plays music on a remote server and I am trying to display this information in the lockscreen / in control center.
So far I don't…

J. Gr
- 21
- 4
1
vote
2 answers
command center Scrubber on lock screen swift
I am trying to add scrubber to command center lock screen, I am getting this error Cannot assign to value: function call returns immutable value I don't know what it means. Any help would be appreciated.
This is how I am trying to change the…

Iam Wayne
- 561
- 6
- 26
1
vote
1 answer
Swift: command center not working, even though I explicitly set buttons to enable?
Ok, having some problems with Apple's command center here, playing background audio/on lock screen and cant understand why. Seems pretty simple but I don't even have the episode information displaying reliably in command center, definitely cant…

blue
- 7,175
- 16
- 81
- 179
1
vote
1 answer
Command Center Events, Only responding to Wireless headphones Play/Pause
I am using AVplayer to stream audio from url. The audio is playing, I set up remote command events. I am only using the Play/Pause buttons, they're working on the lock screen. The issue is that whenever I connect wired headphones, the play/pause…

Iam Wayne
- 561
- 6
- 26
1
vote
0 answers
Audio Controls on Lock Screen/Control Center From AV player Issues
Im new to swift and Im having issues while using MPRemoteCommandCenter.
When I try to control the audio settings, previously accessed songs also start playing along with the current song.
Im trying to access using the following…

Geethanjali Reddy
- 213
- 3
- 17
1
vote
2 answers
Getting MPRemoteCommandCenter.shared() to work in tvOS
Ok, maybe I missed something here. I want to use the black remote with my app and got this code essentially from the WWDC 2017 talk on the issue. It says ...
Consistent and intuitive control of media playback is key to many apps on tvOS, and proper…

user3069232
- 8,587
- 7
- 46
- 87
0
votes
0 answers
Command Center media buttons is not syncing with App's media state Swift Unity
I have created a media player plugin using swift framework for my Unity project, the media player works fine on the app.
But, when the App's media state is paused the Command Center media button does not update its still on the pause icon and same…

Kim Kong
- 1
- 2
0
votes
0 answers
SwiftUI set up MPRemoteCommandCenter
Just trying to better understand SwiftUI...
Where/how should I set up MPRemoteCommandCenter? if I call it from OnAppear would I be creating multiple instances of MPRemoteCommandCenter.shared()?
func setupRemoteControlCenter() {
guard let player…

Dan
- 543
- 2
- 13
0
votes
1 answer
Can MPRemoteCommandCenter listen to custom events other than playing or pausing audio,video?
I have an app will run in the background. I think it's gonna be very convenient for my users if they are allowed to stop the background service on lock screen. Otherwise they will have to unlock the phone first and locate my app from all apps they…

jeep
- 615
- 2
- 10
- 19
0
votes
0 answers
No control interface appears on iOS app using MPRemoteCommandCenter
In my iOS app, I play music and I want to display playback controls on the lock screen, allowing the user to control the audio player.
So following this tutorial and this tutorial, here is what I tried with MPRemoteCommandCenter:
override func…

matteoh
- 2,810
- 2
- 29
- 54