在 iOS5 中使用 Apple 的 Reachability 代码时,我收到一堆编译错误,如下所示。对这里发生的事情有什么想法吗?我正在使用 ARC,所以我稍微编辑了标准代码以删除autorelease/retain
和NSAutoReleasePool
.
架构armv7的未定义符号:
“_SCNetworkReachabilityCreateWithAddress”,引用自:
+[ReachabilityreachabilityWithAddress:]在Reachability.o中
“_SCNetworkReachabilityCreateWithName”,引用自:
+[ReachabilityreachabilityWithHostName:]在Reachability.o中
“_SCNetworkReachabilityUnscheduleFromRunLoop”,引用自:
-Reachability.o 中的[Reachability stopNotifier]
“_SCNetworkReachabilityScheduleWithRunLoop”,引用自:
-Reachability.o 中的[Reachability startNotifier]
“_SCNetworkReachabilitySetCallback”,引用自:
-Reachability.o 中的[Reachability startNotifier]
“_SCNetworkReachabilityGetFlags”,引用自:
-Reachability.o 中的[Reachability 连接必需]
-Reachability.o 中的[Reachability currentReachabilityStatus]
ld:未找到架构 armv7 clang 的符号:错误:链接器
命令失败,退出代码为 1(使用 -v 查看调用)
有人有 iOS5 下 ARC 的可行可达性代码吗?
我为 ARC 和 iOS5 编写了一个干净的“直接”版本的可达性 - 您可以在这里获取它:https://github.com/tonymillion/Reachability https://github.com/tonymillion/Reachability
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)