Подтвердить что ты не робот

IOS _OBJC_CLASS _ $_ ASIdentifierManage, на который ссылается: objc-class-ref в ViewController.o

Я пытаюсь запустить WebView в iOS и передавать IDFA как часть запроса GET, но когда я пытаюсь его создать, и я получаю следующую ошибку:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
   objc-class-ref in ViewController.o
   ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Вот код, который у меня есть. Любая идея, что я делаю неправильно здесь, я немного застрял

    #import "ViewController.h"
    #import "AdSupport/ASIdentifierManager.h"

    @interface ViewController ()
    @end

    @implementation ViewController
    @synthesize webView;



    - (void)viewDidLoad
    {
        NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];

    webView.backgroundColor = [UIColor blueColor];
    NSURL *url = [NSURL URLWithString:@"http://example.com/"];
    NSString *param = [url.path stringByAppendingString: idfaString];
    NSURL *send = [[NSURL alloc] initWithString:param];
    NSURLRequest *req = [NSURLRequest requestWithURL:send];

    [webView loadRequest:req];


    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

    - (void)didReceiveMemoryWarning
   {
       [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
4b9b3361

Ответ 1

Убедитесь, что ASIdentifierManager.m отмечен в разделе "Целевое членство" для целевой цели проекта.

Ответ 2

Если вы так глупы, как я, не забудьте добавить AdSupport.framework в свой проект.