Reachability iOS 5.1 (iPad)

2019-09-10 20:15发布

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

2条回答
\"骚年 ilove
2楼-- · 2019-09-10 20:46

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.

查看更多
神经病院院长
3楼-- · 2019-09-10 20:52

You need to link Reachability to your target.

查看更多
登录 后发表回答