我正在使用以下代码来显示用于 admob 测试应用程序的唯一标识符。
这是我的 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]);
}
构建“使用未声明的标识符:ASIdentifierManager”时出现错误
我链接了 AdSupport 框架,并且可以访问声明标识符管理器的文件,但它仍然无法识别?
我已经清理了构建文件夹,重新启动了 xCode 相同的结果。