How do I use the user's location in your app?

Source: Internet
Author: User

How do I use the user's location in your app?

There is and more settings

(1) Click the project-> Build phases, link Binary with Libraries, click "+", Search for "location", Click the corelocation.framework, import the library to your project

(2) Find Info.plist,and Add-keys and values

The first key is:nslocationwheninuseusagedescription, you can put whatever your want in the Value field to explain your re Ason to request user Location,such as "Because I want to know where is". This can-help-request user location when the app is running.

The second key is:nslocationalwaysusagedescription,you can puts reasons in the value field such as "Because I always want t o Know your locations ", this can help you in any time-to-get the user location, even the app isn't running.

How do I use the user's location in your app?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.