programmatically READ iPhone settings - iphone

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.

Related

Switching from View 1 to Bluetooth settings..can't possible?

I am facing problem in switching from view 1 to Bluetooth settings i.e in view 1 i have given 1 Button..on clicking on that button i want to switch to view 2(Bluetooth settings)..but it can't be possible in iPhone..since we can't access the default settings of iPhone..for that we have to create the application preferences..
Q.1 Is there any way to access the default settings of Bluetooth in iPhone?
Q.2 Is there any official link where it can be mention that we can't access the default settings?
I want suggestion..please help..
Thanks in advance
Apps cannot open the settings application to a specific screen. The reason that apps like MapMyFitness open preferences is because they ask for permission to use Bluetooth Low Energy. Asking for permission is managed by CBCentralManager on first usage.
These popups are shown automatically by the system framework. The message can be customized using the purpose property for location services, that is not possible in case of Bluetooth.
No private API was used for this, so there's no reason for the app to be rejected.
Credit goes to this bellow SO question
how some apps can open setting app programmatically within their app
que 2.
At previous we are opening Setting Page from app Using Bellow line of Code:-
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
But now upto ios5.0 it was working after that this one depreciated. and Till now Apple not providing the URL Schema for achieving this one in newer versions.
Links of similar question and it's Answer:-
Call the official *Settings* app from my app on iPhone
iPhone- Open Settings from my application iOS 6
is it possible to open Settings App using openURL?
Programmatically opening the settings app (iPhone)
How can I open the Settings app when the user presses a button?
iPhone: Opening Application Preferences Panel From App
Open UIPickerView by clicking on an entry in the app's preferences - How to?
Open the Settings app?

Customizing settings.bundle in iphone

I want to make app settings using plist like the Twitter app settings and have my app name's status appear as "Installed" like done in Twitter.
If I understand correctly, you want your app in the twitter setting of settings app.
Well I sorry to tell you that that is not possible.
The twitter setting in the settings is build by apple to only detect the official twitter app.
If you just want you app under the settings app the read this: Implementing an iOS Settings Bundle
Twitter is able to do that because Apple has included it as part of the OS core functionality. In other words, if Twitter is not installed then the Twitter settings are still available because Twitter can be used even with the app.
You can't do this with your app because if the app isn't installed then the settings won't appear anyway. Your settings will only show if the app is installed so saying 'installed' is redundant and unnecessary.

Autostart of an iphone app

I am building GPS Tracking app. I want the tracking functionality to be started
after a reboot of device. Now I did with background compatibility, It works fine on background, but I need to start tracking when the device is rebooted (switch on) without having to open the app to start the functionality.
How can I implement that. Please give me procedure for how to enable the autostart for
that app and how to invoke a method to start tracking.
If you watch the app like skype and webEx that are autostarted on iphone starts..
How these apps are working. I have no idea for enabling this autostart.
Please suggest me how to do?
Thanks in advance...
Add the UIBackgroundModes key to your app’s Info.plist file. Set the value of this key to an array that includes the voip string.
You can do that in xcode: Select your project root -> Capabilities -> Background Modes -> check 'Voice over IP'.
From the documentation:
"An app with this key is also relaunched in the background immediately after system boot".
No third party app can be launched on startup. Skype (and others) simple respond to push notifiactions
The only way to actually open an app from the user not explicitly opening it, is to call a [[UIApplication sharedApplication] openURL]; - or somehow otherwise open a URL, and you have to set your app up to have a custom URL scheme... see this page.
E.g: Doodle jump has URLs such as doodlejump://highscores - which you can open from an email from them or their website.

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.

How to programmatically change iPhone settings

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.