Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom remote event handling in app from iOS lock screen

How does spotify handle custom remote events? Currently on iPhone 6 running iOS 8.1.3 and spotify version 2.4.0.1822 I get the following controls on the lock screen when I turn on spotify radio. Ive tried reading all docs pertaining to remote events, and I'm unable to find any resources which allow custom remote events from the lock screen.

enter image description hereenter image description here

like image 823
johnny peter Avatar asked Feb 23 '15 15:02

johnny peter


People also ask

How do I put a shortcut on my iPhone Lock Screen?

Add widgets to your Lock ScreenTouch and hold the Lock Screen until the Customize button appears at the bottom of the screen, then tap Customize. Tap the box below the time to add widgets to your Lock Screen. Tap or drag the widgets you want to add. to remove a widget and make room for a new one.

How do I remove the shortcuts on my iPhone Lock Screen?

Disable Other Options in Lock Screen Without Screen Time Go to Settings and tap on Touch ID & Passcode. You will be asked to enter your passcode once. Scroll a little to find Allow Access When Locked heading. That is where you can toggle all these shortcuts with the tap of a finger.

How do I change my Lock Screen on iOS 15?

On your Lock screen, hard press, which will bring up the Lock Screen/Wallpaper options on your iPhone. Tap the "+" sign at the bottom right of the device. Choose the wallpaper you wish to use.

What is iPhone Lock Screen?

The Lock Screen—which shows the current time and date, your most recent notifications, and a photo or any custom widgets you've added—appears when you turn on or wake iPhone. From the Lock Screen, you can see notifications, open Camera and Control Center, get information from your favorite apps at a glance, and more.


1 Answers

Maybe that is implemented with MPRemoteCommandCenter. Here is example...

MPRemoteCommandCenter *remoteCommandCenter = [MPRemoteCommandCenter sharedCommandCenter];
[[remoteCommandCenter skipForwardCommand] addTarget:self action:@selector(skipForward)];
[[remoteCommandCenter togglePlayPauseCommand] addTarget:self action:@selector(togglePlayPause)];
[[remoteCommandCenter pauseCommand] addTarget:self action:@selector(pause)];
[[remoteCommandCenter likeCommand] addTarget:self action:@selector(like)];

Implement this code, play music on your app, and lock your iPhone. You will probably see a customized lock screen.

Note - Menu can be customized label, but it can not customize icon image and number of row.

like image 72
beryu Avatar answered Oct 05 '22 04:10

beryu