Use of undeclared identifier: ASIdentifierManager
20,164
Have you imported headers from the framework?
#import <AdSupport/ASIdentifierManager.h>
Related videos on Youtube
![StuartM](https://i.stack.imgur.com/Tbb5R.png?s=256&g=1)
Author by
StuartM
Web Developer/iOS Developer. Current Apps: Where to Next -https://itunes.apple.com/us/app/where-to-next/id884766874?ls=1&mt=8 Shows business data around your current location.
Updated on July 09, 2022Comments
-
StuartM almost 2 years
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.
-
Shmidt over 11 years#import <AdSupport/ASIdentifierManager.h>
-