iOS _OBJC_CLASS _ $ _ ASIdentifierManage引自:ViewController.o中的objc-class-ref

 谁是美甲花样美指 发布于 2023-02-13 08:58

我试图在iOS中启动WebView并将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

Enrico Susat.. 27

如果你和我一样愚蠢,别忘了添加AdSupport.framework你的项目.

2 个回答
  • 确保ASIdentifierManager.m在"目标成员资格"下检查项目的目标.

    2023-02-13 09:05 回答
  • 如果你和我一样愚蠢,别忘了添加AdSupport.framework你的项目.

    2023-02-13 09:08 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有