Problem with CoreLocation

Discussion in 'iOS Development' started by juanillo, May 27, 2009.

  1. juanillo

    juanillo New Member

    Joined:
    May 27, 2009
    Messages:
    5
    Likes Received:
    0
    Hello, I have tried to use GPS without WiFi and without SIM card, but never worked. I have coded a program based on example 'LocateMe', that can be downloaded at Apple Developer page: http://developer.apple.com/iphone/library/samplecode/LocateMe/index.html
    I'm only want coordinates and speed, not maps or something.

    Instance method locationManager:didFailWithError: always returns me kCLErrorLocationUnknown.

    I have executed the program in opened sky for about ten minutes, and always returns kCLErrorLocationUnknown.

    Is iPhone blocked the use of GPS without SIM card?

    Anyone can help me?

    Thank You.

    PD: Sorry for my poor english.
  2. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    Well yes.... you need the sim card to connect to the carrier/network towers..... it isn't going to work without a sim card.

    *EDIT*
    According to someone I was talking to, there is no "technical" reason why one would need a sim card for GPS

    Although yes for cell tower trigonometry you would need the sim card so it could geo locate the towers.
  3. juanillo

    juanillo New Member

    Joined:
    May 27, 2009
    Messages:
    5
    Likes Received:
    0
    I know that iPhone has A-GPS and it could retrieve some info from cell tower for known position faster. But, like you have said, there shouldn't be problem to use pure GPS.

    I coded the same program for Nokia N95 and it works, it gave me location and speed.

    Can anyone try to get coordinates on his iPhone 3G without Wifi and without SIM card, and tell me if it is possible?

    I starting thinking that my iPhone GPS are broken.
  4. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    No I don't think it is, it's just an iPhone restriction probably.
  5. Pelaez-1

    Pelaez-1 New Member

    Joined:
    May 5, 2008
    Messages:
    822
    Likes Received:
    0
    Device:
    iPhone
    There's a message you have to send to the Location Manager to start updating the location. Did you do that?
  6. juanillo

    juanillo New Member

    Joined:
    May 27, 2009
    Messages:
    5
    Likes Received:
    0
  7. Pelaez-1

    Pelaez-1 New Member

    Joined:
    May 5, 2008
    Messages:
    822
    Likes Received:
    0
    Device:
    iPhone
  8. juanillo

    juanillo New Member

    Joined:
    May 27, 2009
    Messages:
    5
    Likes Received:
    0
    I can't compile this example because i'm compiling in a jailbreaked iPhone and i don't know how to compile XIB to NIB file.

    In any case, It shouldn't work since what trumps me is the CoreLocation Framework.

    Anybody can try to see if LocateMe example works without WiFi and without SIM card? It would be very useful for me.

    Thank you.
  9. juanillo

    juanillo New Member

    Joined:
    May 27, 2009
    Messages:
    5
    Likes Received:
    0
    Definitly iPhone blocks GPS when is not SIM card inserted.
    Today i have proved the program with SIM card and get my location without problems.

Share This Page