我正在尝试将 admob 集成到我的 ios 应用程序中,但是当我添加 sdk 并构建它时出现以下错误。
Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithName", referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[GADNetworkChecker startNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[GADNetworkChecker stopNetworkChecking] in libGoogleAdMobAds.a(GADNetworkChecker.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经包含了所有必需的框架,包括 SystemConfiguration、CFNetwork 等。
更新
我在模拟器中构建时遇到此错误,但在使用设备构建时却没有。是sdk的问题吗?我正在使用模拟器 5.1。