本文介绍了使用未声明的标识符:ASIdentifierManager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用下面的code展现出独特的标识符用于AdMob的测试应用程序。
I am using the following code to show the unique identifier to be used for admob test apps.
这是我的applicationDidFinishLaunching ...
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]);
}
我建的时候得到一个错误使用未声明的标识符:ASIdentifierManager
I get an error when building 'Use of undeclared identifier: ASIdentifierManager'
我有AdSupport框架链接和访问标识符管理声明中的文件,但它仍然不承认?
I have the AdSupport framework linked and can access the files the identifier manager is declared in, but it still doesn't recognise that?
我已经清理生成文件夹,重新启动X $ C $Ç相同的结果。
I have cleaned build folder, restarted xCode same result.
推荐答案
您是否从框架进口的头?
Have you imported headers from the framework?
#import <AdSupport/ASIdentifierManager.h>
这篇关于使用未声明的标识符:ASIdentifierManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!