6

This application and this application says it displays live wallpapers on lock screen. We have similar requirement.

From reviews came to know that it is playing music in background with silent volume, but it is not relevant to setting wallpapers.

Totally bummer topic for us. Can anyone please suggest some point where to begin.. ?

Referred this and Referred this questions on our forum, but says that it won't be approved by Apple. So how does current application exist on store ?

Note: Please consider this as genuine programming questions as there is no starting point we can find.

Community
  • 1
  • 1
Janak Nirmal
  • 22,706
  • 18
  • 63
  • 99

2 Answers2

4

If you play music, you can use MPNowPlayingInfoCenter (Available in iOS 5.0 and later.) to set things like cover art, title and artist on the lock screen. Your code could look like this:

NSMutableDictionary *currentTrackData = [[NSMutableDictionary alloc] init];
[currentTrackData setObject:"Some text" forKey:MPMediaItemPropertyTitle];

MPMediaItemArtwork *mediaItemArtwork =[[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:@"your image path"]];
[currentTrackData setObject:mediaItemArtwork forKey:MPMediaItemPropertyArtwork];
[mediaItemArtwork release];

[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = currentTrackData;

Dont forget to import the media player framework:

#import <MediaPlayer/MediaPlayer.h>
Thomas Kekeisen
  • 4,355
  • 4
  • 35
  • 54
0

The live lockscreen app must be doing it this way (MPNowPlayingInfoCenter) as you cant play music whilst using the app

user1389253
  • 251
  • 2
  • 3