简体   繁体   English

是否仅在iOS中的时区需要位置服务提示

[英]Is the location services prompt needed for only timezone in ios

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 我正在使用这个:var timeZone = NSTimeZone.localTimeZone()。name

Thanks for any help. 谢谢你的帮助。

Keith 基思

No. You will never get a prompt for localtimezone which is used by default when creating your NSDate objects. 不会。创建NSDate对象时,默认情况下不会使用localtimezone提示。 BTW you are not defining any timeZone like this you are only assigning the name of the local timezone to a var. 顺便说一句,您没有像这样定义任何timeZone,您只是将本地时区的名称分配给了var。

If you need some more info regarding time zones you should take a look at this link: 如果您需要有关时区的更多信息,请查看以下链接:

using NSTimeZone framework 使用NSTimeZone框架

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM