I am trying to launch a WebView in iOS and transmit the IDFA as part of a GET request but when I try to build it fails and I get the following error:
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)
Here is the code I have. Any idea what I'm doing wrong here, I am a bit stuck
#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
In case you are as stupid as me, don't forget to add AdSupport.framework
in your project too.