Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I access the iPhone's settings from my code?

All I want to do is be able to tell whether or not a user of my app is using the 24-hour clock or not. I realize that I can't set these settings, I just want to read them. If you don't know what I'm talking about, I want to be able to read the values a user has set in the built-in "Settings" app of the iPhone. The one with the gray gears as the icon.

I tried googling a variety of searches that might provide an answer, but that didn't work. I tried looking through the documentation that Apple provides for xcode programmers, but that didn't turn anything up, either.

like image 676
Carter Pape Avatar asked Jul 11 '11 20:07

Carter Pape


People also ask

Where do I enter my Apple ID verification code?

Open the Settings app. Tap Sign in to your [device]. Enter your Apple ID and password. If prompted, enter the six-digit verification code sent to your trusted device or phone number and complete sign in.

What is iPhone device code?

Every Apple iPhone, iPod touch and iPad has a unique device ID number associated with it, known as a Unique Device ID (UDID). Apple's device ID is a 40-digit sequence of letters and numbers. Customers can access their device ID numbers in iTunes or by downloading a free app from the Apple App Store.

How do I get my settings?

Open Quick Settings To find your first few settings, swipe down from the top of your screen. To find all your Quick Settings, swipe down again.


1 Answers

If you want this information in order to display a time, you don't need to query the Settings app. NSDateFormatter will format the time according to the user's settings automatically.

like image 148
Steve Madsen Avatar answered Sep 27 '22 23:09

Steve Madsen