简体   繁体   中英

geo location and blocking access to my app on iPhone

I am working on a radio player for iPhone. What I need is to provide my position before playing stream. I am thinking of using CoreLocation, it's ok, but how to determine geo position if user does not allow CoreLocation when asked ?

What would be the best way to determine the position of the iPhone? I was thinking of getting IP address, but it could be an address from another country. For exemple, user has an iPhone account in United States, and is using my application in 3G in Canada, IP address will be provided by his cell carrier right ?

So I was wondering how to get cell carrier name, without success... using a private framework is not possible.

I am waiting for your great suggestions!

thierry

I would just use core location. If for whatever reason the user declines the core location popup, then just prompt them to enter their location manually (eg choose country and city).

You could use the IP address, but then you run into other problems as well (for instance if they are using WiFi on their iPhone or are on an iPod touch.

I think this is not allowed, and by design. If the user doesn't want your app to know where they are, why do you think you have the right to ignore their wishes?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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