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.
Make sure ASIdentifierManager.m
is checked under "Target Membership" for your project's target.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With