Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Access System Settings

Hi All,

I just started xCode after doing a lot of C++ and Javascript, and I'm trying to make an app that changes your home screen wallpaper every 5 seconds. I know your can ask for contact and photo permissions but is there away to get system settings without jailbreaking?

Thanks!

2 Answers

Lachlan Mitchell
Lachlan Mitchell
9,278 Points

Hey Jamie! Unfortunately, there's no way to directly set the wallpaper of the device. Can you imagine how many apps would abuse this feature if it were in the public API?

You can, however, save an image to the device which the user can then manually set as the wallpaper. Check out UIImageWriteToSavedPhotosAlbum. It's reasonably simple to get your head around, but just google the function if you need any additional help with it.

Hope that helps!

  • Akyri

Are there any workarounds like macros or the way the music app does it with the boxes?

Lachlan Mitchell
Lachlan Mitchell
9,278 Points

I'm afraid I'm not sure of what you're after. Could you please elaborate a little more?

As far as I know, there is no way to workaround it. As a restriction enforced by Apple, any way you could possibly get around it would be rejected by their app review team anyway.