0

I can't seem to find if I need to have the location services prompt if I'm just using the timezone? I've turned off location services on my phone while testing and it still finds my timezone with it off. I just don't want to be rejected by apple.

I'm using this: var timeZone = NSTimeZone.localTimeZone().name

Thanks for any help.

Keith

Keith
  • 1,969
  • 4
  • 17
  • 27

1 Answers1

1

No. You will never get a prompt for localtimezone which is used by default when creating your NSDate objects. BTW you are not defining any timeZone like this you are only assigning the name of the local timezone to a var.

If you need some more info regarding time zones you should take a look at this link:

using NSTimeZone framework

Community
  • 1
  • 1
Leo Dabus
  • 229,809
  • 59
  • 489
  • 571
  • Thanks for replying again! Sorry if I wasn't that clear, I'm not trying to define a timezone, just storing the users current timezone. I just didn't know if they would have to click "ok" on the allow location services prompt. – Keith Dec 10 '14 at 21:42
  • Like I said it has nothing to do with location settings and it doesn't monitor the user location. If you need the location you have to use CFLocationManager and you have to ask the user's permission to access this info. https://developer.apple.com/library/mac/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/cl/CLLocationManager – Leo Dabus Dec 10 '14 at 21:47
  • Again it will NOT ask anything to the final user. – Leo Dabus Dec 10 '14 at 21:54
  • Thanks, sorry just making 100% sure if I was unclear. I didn't want to submit it and have that come back. But it makes sense now. – Keith Dec 10 '14 at 21:56