Ios AdMob问题和错误
我正在尝试在iOS应用程序中实现AdMob。我遵循了他们提供的文档。因此,我尝试构建并运行,但出现以下错误:Ios AdMob问题和错误,ios,admob,linker-errors,ads,Ios,Admob,Linker Errors,Ads,我正在尝试在iOS应用程序中实现AdMob。我遵循了他们提供的文档。因此,我尝试构建并运行,但出现以下错误: Undefined symbols for architecture i386: "_NSOverwriteMergePolicy", referenced from: anon in libGoogleAnalyticsServices.a(GAIDataStore.o) anon in libGoogleAnalyticsServices.a(TAGMod
Undefined symbols for architecture i386:
"_NSOverwriteMergePolicy", referenced from:
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
"_NSSQLiteErrorDomain", referenced from:
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSSQLiteStoreType", referenced from:
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
"_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_OBJC_CLASS_$_NSAttributeDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"_OBJC_CLASS_$_NSEntityDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGDataProvider.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"_OBJC_CLASS_$_NSFetchRequest", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
编辑1:我添加了Storekit和MessageUI框架,还添加了Obj-C
链接器标志,现在我得到了以下信息:
Undefined symbols for architecture i386:
"_NSOverwriteMergePolicy", referenced from:
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore contextWithModel:URL:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore contextWithModel:URL:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore contextWithModel:URL:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
"_NSSQLiteErrorDomain", referenced from:
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
"_NSSQLiteStoreType", referenced from:
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
anon in libGoogleAnalyticsServices.a(TAGModel.o)
anon in libGoogleAnalyticsServices.a(GAIDataStore.o)
-[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
"_OBJC_CLASS_$_NSAttributeDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
objc-class-ref in libGoogleAnalytics_debug.a(GAICoreDataUtil.o)
"_OBJC_CLASS_$_NSEntityDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGDataProvider.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
objc-class-ref in libGoogleAnalytics_debug.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalytics_debug.a(GAICoreDataUtil.o)
"_OBJC_CLASS_$_NSFetchRequest", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalytics_debug.a(GAIDataStore.o)
"_OBJC_CLASS_$_NSManagedObject", referenced from:
_OBJC_CLASS_$_GAIHit in libGoogleAnalyticsServices.a(GAIHit.o)
_OBJC_CLASS_$_TAGHit in libGoogleAnalyticsServices.a(TAGHit.o)
_OBJC_CLASS_$_GAIProperty in libGoogleAnalyticsServices.a(GAIProperty.o)
_OBJC_CLASS_$_GAIProperty in libGoogleAnalytics_debug.a(GAIProperty.o)
_OBJC_CLASS_$_GAIHit in libGoogleAnalytics_debug.a(GAIHit.o)
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalytics_debug.a(GAIDataStore.o)
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
objc-class-ref in libGoogleAnalytics_debug.a(GAICoreDataUtil.o)
"_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalytics_debug.a(GAIDataStore.o)
"_OBJC_METACLASS_$_NSManagedObject", referenced from:
_OBJC_METACLASS_$_GAIHit in libGoogleAnalyticsServices.a(GAIHit.o)
_OBJC_METACLASS_$_TAGHit in libGoogleAnalyticsServices.a(TAGHit.o)
_OBJC_METACLASS_$_GAIProperty in libGoogleAnalyticsServices.a(GAIProperty.o)
_OBJC_METACLASS_$_GAIProperty in libGoogleAnalytics_debug.a(GAIProperty.o)
_OBJC_METACLASS_$_GAIHit in libGoogleAnalytics_debug.a(GAIHit.o)
"_llvm_gcda_emit_arcs", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIHitUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIURLConnection.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackedViewController.o)
...
"_llvm_gcda_emit_function", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIHitUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIURLConnection.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackedViewController.o)
...
"_llvm_gcda_end_file", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIProperty.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIHitUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIURLConnection.o)
...
"_llvm_gcda_increment_indirect_counter", referenced from:
-[GAITrackerImpl gai_set:value:] in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
-[GAITrackerImpl gai_get:] in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
-[GAITrackerImpl gai_send:] in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
-[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalytics_debug.a(GAIDataStore.o)
_GAIReachabilityStatusString in libGoogleAnalytics_debug.a(GAIReachabilityChecker.o)
-[GAI defaultTracker] in libGoogleAnalytics_debug.a(GAI.o)
-[GAI setDefaultTracker:] in libGoogleAnalytics_debug.a(GAI.o)
...
"_llvm_gcda_start_file", referenced from:
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDefaultLogger.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackerImpl.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIError.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIProperty.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIHitUtil.o)
___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIURLConnection.o)
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
您是否完成了第三步: 添加所需的链接器标志 现在需要将-ObjC添加到应用程序目标的构建设置的其他链接器标志中: 在Xcode的项目导航器中,按蓝色的顶级项目图标。 单击目标,然后单击“生成设置”选项卡。 在其他链接器标志下,将-ObjC添加到Debug和Release中 他们说: SDK库引用了六个iOS开发框架,这些框架可能 尚未成为项目的一部分:
- 储物箱
- 音频工具箱
- MessageUI
- 系统配置
- 岩芯图
- 支架
- 事件工具包
- 事件基图
确保以与添加iOS框架相同的方式将Google LIB添加到项目中。查看。还有AdMob 6.12.0的EventKit和EventKitUI。您是否找到了解决此问题的方法?