I am using the following code to show the unique identifier to be used for admob test apps.
This is with my applicationDidFinishLaunching...
// Print IDFA (from AdSupport Framework) for iOS 6 and UDID for iOS < 6.
if (NSClassFromString(@"ASIdentifierManager")) {
NSLog(@"GoogleAdMobAdsSDK ID for testing: %@" ,
[[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]);
} else {
NSLog(@"GoogleAdMobAdsSDK ID for testing: %@" ,
[[UIDevice currentDevice] uniqueIdentifier]);
}
I get an error when building 'Use of undeclared identifier: ASIdentifierManager'
I have the AdSupport framework linked and can access the files the identifier manager is declared in, but it still doesn't recognise that?
I have cleaned build folder, restarted xCode same result.
Have you imported headers from the framework?
#import <AdSupport/ASIdentifierManager.h>
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