开发者

_kCLLocationAccuracyHundredMeters referenced from... problem

开发者 https://www.devze.com 2023-03-25 10:01 出处:网络
i have no idea how to solve my problem, i tried to make 100 modifications but it still tells me that message :

i have no idea how to solve my problem, i tried to make 100 modifications but it still tells me that message :

_kCLLocationAccuracyHundredMeters', referenced from : _kCLLocationAccuracyHundredMeters$non_lazy_ptr in SetupViewController.o (maybe you meant: _kCLLocationAccuracyHundredMeters$non_lazy_ptr)

here's my code :

- (void)viewDidLoad {
    NSMutableArray *options = [NSMutableArray array];
    [options addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"AccuracyBest", @"AccuracyBest"), kAccuracyKey, [NSNumber numberWithDouble:kCLLocationAccuracyBest], kAccuracyValue, nil]];
    [options addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Accuracy10", @"Accuracy10"), kAccuracyKey, [NSNumber numberWithDouble:kCLLocationAccuracyNearestTenMeters], kAccuracyValue, nil]];
    [options addObject:[NSDic开发者_StackOverflow中文版tionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Accuracy100", @"Accuracy100"), kAccuracyKey, [NSNumber numberWithDouble:kCLLocationAccuracyHundredMeters], kAccuracyValue, nil]];
    [options addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Accuracy1000", @"Accuracy1000"), kAccuracyKey, [NSNumber numberWithDouble:kCLLocationAccuracyKilometer], kAccuracyValue, nil]];
    [options addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Accuracy3000", @"Accuracy3000"), kAccuracyKey, [NSNumber numberWithDouble:kCLLocationAccuracyThreeKilometers], kAccuracyValue, nil]];
    self.accuracyOptions = options;
}

i have those importations in the .m :

import "SetupViewController.h"

import < CoreLocation/CoreLocation.h>

and i receive 5 errors for the 5 kCL ... distance stuff (meters, hundredMeters, kilometer...)

Do you have any solution?

Thanks a lot

Paul


It looks like you did not add the Core Location framework to the project. For instructions on how to do this in Xcode4, refer to this answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消