Reachability iOS 5.1 (iPad)

我只是一个虾纸丫 提交于 2019-12-13 07:14:41

问题


I currently try to use Reachability in iOS 5.1 on iPad. There is a modification by Tony Million on Github which I tried to use.

Unfortunately in my project it didn't work! I compared his project to mine and didn't find any differences. I also tried to hardcopy his example code But it still doesn't work!!! (Yes, I added SystemConfiguration.framework)

Every time I try to compile I get a Undefined symbols for architecture i386 error. Here my complete error message:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_Reachability", referenced from:
      objc-class-ref in ViewController.o
  "_kReachabilityChangedNotification", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Does anybody know about this issue? Can anybody help me?

Thanks a lot, greetings, Julian


回答1:


This usually means you didn't add to the target either the header file in the copy headers section in the build phases or the implementation file in the compile sources.




回答2:


You need to link Reachability to your target.



来源:https://stackoverflow.com/questions/9804526/reachability-ios-5-1-ipad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!