tags:

views:

96

answers:

2

Hello,

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

A: 

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 (e.g. 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.

Eric Petroelje
Thanks for your answer, but I don't want to ask the user. Using IP would be ok if corelocation is not allowed by user, but an US iPhone connected on canadian carrier has an US IP address. I did the test...
thierryb
A: 

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?

Matt Dawdy