CoreLocation problem

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

  1. dusker macrumors member

    May 31, 2009
    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


    _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:
    any help will be greatly appreciated

  2. Saladinos macrumors 68000


    Feb 26, 2008
    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

    May 31, 2009
    ahhh there's the error! Thank you very very much i really appreciate this!

Share This Page