Add image on lock screen in iOS app, when app is running in background
Asked Answered
W

2

3

There are many question on site like

Programatically changing the iOS lock-screen ,

How to set lock screen , wallpaper and Ringtone programmatically in iPhone? All say that apple will reject if we modify the lock-Screen image.

But I seen it in many apps. Example Saavn is in AppStore.

In this if a song is playing and device is locked, It shows the image of the current album on the lock screen.

Please share if anybody know how it can be done. Thanks.

Whitmore answered 22/2, 2013 at 12:34 Comment(0)
B
3

Music apps can change the lock screen wallpaper because iOS automatically displays the album artwork for the song/podcast/etc that's playing (see MPMusicPlayerController docs). As far as I know, it's not an API that's publicly available to developers.

Bricebriceno answered 22/2, 2013 at 12:38 Comment(0)
H
1

The "podcaster" app (3rd party not apple) displays an image of the currently playing podcast. Podcast images are stored in the RSS feed and not in each mp3 so the app is dynamically telling the os which image goes with with mp3. Of course you can play "silence" out of the speaker but I don't think this is a clean solution

Heave answered 22/2, 2013 at 12:58 Comment(4)
apple won't approve an app that plays "silence"Hanghangar
If your app needs to tell the user of events you could get away with playing silence mixed with helpful notification sounds. This is sort of a hacked replacement for push but apple might approve itHeave
Hell, play elevator music when they lock the app. Lol!Heave
We all need ASMR all the time. An ASMR Reminder/to-do/motivational app! :)Randell

© 2022 - 2024 — McMap. All rights reserved.