Determine iPhone user's country

前端 未结 5 1357
天涯浪人
天涯浪人 2020-12-05 02:41

I need to determine at startup what country a user is in, for an iPhone application. Presumably I will have to turn on location services and do some sort of reverse geocodin

5条回答
  •  爱一瞬间的悲伤
    2020-12-05 03:18

    The NSLocale object, such as returned by [NSLocale systemLocale], and[NSLocale autoupdatingCurrentLocale]`) contains the value NSLocaleCountryCode. Check it out in the Apple documentation.

提交回复
热议问题