I’d like to be able to set the lockscreen background image programmatically. I’m aware that this is only possible for jailbroken iOS devices.
Here are some things that I’ve tried:
-
Place a LockBackground.png in /private/var/mobile/Library/SpringBoard/. This works but requires a hard respring.
notify_post("com.apple.language.changed");doesn’t work for a soft respring. -
Use
class-dumpto dump private methods of UIKit. UIKit in 4.2 used to have a method called+ (void)setDesktopImageData:(id)fp8;but it appears to be missing in 4.3 and above.
Is there anything that I’m missing?
I found this in the SpringBoard dump which I think will be of use to you:
In SBWallpaperView.h:
And in SBUIController.h:
So you can do something like:
That’s one way.
The other one I found was to use SBWallpaperView’s
+ (void)noteWallpaperPreferencesChanged;, I’m not that sure about this one, but it seems like if you do what you did in the first thing you tried, and then use this instead of a respring, it might work.