How to programmatically change iPhone settings - iphone

It is possible to change iPhone settings from an application?
I want to change settings like enable/disable WIFI, enable/disable vibrations, change ring tone, enable/disable bluetooth, call forwarding, mail accounts, etc. I want to be able to change all settings programmatically. I would appreciate some sample code.
Thanks for any help.

You cannot do this unless your application is run on a jailbroken phone.

You can do some of these items programatically on a non-jailbroken phone. Toggling Bluetooth is discussed here, and it's very easy to get working. Programmatically turn on bluetooth in the iphone sdk?
I am not sure about the other items. Of course you cannot submit this code to the app store, but for personal use it can be very handy.

Related

Detect iPhone/iPad auto-screenlock settings

Is is possible for a non-jailbroken app to detect Auto-Screenlock settings (such as if users disabled/enabled auto-screenlock in their device general settings)?
If so, how to implement it?
EDIT:
For business solution: http://www.apple.com/iphone/business/integration/mdm/
As an alternative, it seems possible to set device configurations server-side using MDM.
Is is possible for a non-jailbroken app to detect Auto-Screenlock settings (such as if users disabled/enabled auto-screenlock in their device general settings)?
No, that's not possible.
I don't know whether a jailbroken phone could do it, but a non-jailbroken phone definitely can't.
As a workaround, you could possibly implement your own timer that removes the confidential information after a certain time?

programmatically READ iPhone settings

I want to programmatically READ iPhone settings such as...
Enable 3G - YES/NO
Vibrate - ON/OFF
Message Alert - ON/OFF
etc.
Can anyone provide a solution?
I'm fairly certain you cannot: see Opening the Settings app from another app
You cannot. Because apple is not providing the API to access the iPhone settings app. But you can keep a bundle setting in your app so that user can change the settings of your app from iphone settings. If you are interested in this feature you can refer Apple doc.

Programmatically changing the iOS lock-screen

I'm building an app which would have to have the ability to show my own views on the iPhone lock screen. I've seen lots of apps which let you customize the lockscreen and so forth and these were App Store apps so i'm guessing it has to possible.
I just can't figure out what to use in the iOS SDK to even try implementing this.
Oh and P.S: same goes for wallpapers—can we change this from inside our app?
It can be changed programmatically (change to SpringBoard), but it won't make the way to the (official) AppStore. So if you want to build an app that can change something like the lock screen wallpaper or the ring tone which you usually need the Settings app for, you have to publish your application via Cydia, not Apple's store.
For a sample code block, see this answer.

Need help to assign ringtones for different contacts

From my application i want to change the following settings of iphone :
I want to set the separate ringtones against individual contacts in iphone.
I want to set ringtone volumes against any contacts
Can I do these from my application?
Please help me to find the procedure as i am a totally newbie to this new technology of iPhone.
Thanks for your help in advance.
Ritz
It's not possible to set/alter ringtone settings via the published iOS SDK (there are most likely "private" methods, but using these will result in your app being rejected), as otherwise any errant application could trivially make irritating changes.
i.e.: Only the user can change the ringtone settings.

For the iPad or iPhone, how do you control the system Volume? For example, have a button that mutes all audio

I would like to make a button in my iPad app (probably will be similar to iPhone apps) that when I push this button, all audio is muted, even when you exit the app.
I don't see anyway that you can control the volume, although I'm sure other apps have that I have seen in the app store for the iPhone. I also read some places that doing this would reject you from the app store.
How could I go about lowering, or highering the volume of the iPad from an app that works even when the app closes?
Thank you!
AFAIK, you can't, at least not programmatically. But you can integrate an MPVolumeView.
Using a UISlider to change volume
You can't do this. Apple does not let you make system-wide changes that affect other apps like this.