CoreLocation problem

Discussion in 'iOS Programming' started by dusker, Jun 28, 2009.

  1. dusker macrumors member

    Joined:
    May 31, 2009
    #1
    Hi,
    i tried build a very simple app that uses CoreLocation to display the current position. I did everything according to a book i follow, and i keep getting two errors:

    ".objc_class_name_CLLocationManager", referenced from:
    literal-pointer@__OBJC@__cls_refs@CLLocationManager in GpsTestViewController.o

    and

    _kCLLocationAccuracyBest$non_lazy_ptr in GpsTestViewController.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    here's the entire project zipped if anyone would like to take a look: http://iapp.pl/code/GpsTest.zip
    any help will be greatly appreciated

    greetings
    peter
     
  2. Saladinos macrumors 68000

    Saladinos

    Joined:
    Feb 26, 2008
    #2
    This is a linker error. You have incorrectly referenced CoreLocation.framework. Delete it from your project file, then add it in XCode again. This time, deselect the copy checkbox, and make sure it is referenced "relative to current SDK".

    You also need a space in the delegate method name. It's "manager didUpdateToLocation" not "managerdidUpdateToLocation". If you don't have the space, it won't get called.

    I'd also recommend using an NSNumberFormatter on the coordinates.
     
  3. dusker thread starter macrumors member

    Joined:
    May 31, 2009
    #3
    ahhh there's the error! Thank you very very much i really appreciate this!
    Cheers!
     

Share This Page