I'm trying to create a small weather app.
What is the best practice to figure out what degree setting the user have? (Celcius or Fahrenheit) Is it possible to read that from the built in weather app?
To answer the original question about the display settings, I'd try this:
NSLocale *locale = [NSLocale currentLocale];
BOOL usesMetric = [[locale objectForKey:NSLocaleUsesMetricSystem] boolValue];
If usesMetric
is YES
, I would use Celsius; otherwise, I'd use Fahrenheit.
You would need to find a web API for this, here are a few:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With