Strange errors in Apple's Reachability files

I’m trying to work with reachability in my project. I added Reachability.h and Reachability.m files. But after building project xCode shows me strange errors:

Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithName", referenced from:
  +[Reachability reachabilityWithHostname:] in Reachability.o
"_SCNetworkReachabilityCreateWithAddress", referenced from:
  +[Reachability reachabilityWithAddress:] in Reachability.o
"_SCNetworkReachabilitySetCallback", referenced from:
  -[Reachability startNotifier] in Reachability.o
  -[Reachability stopNotifier] in Reachability.o
"_SCError", referenced from:
  -[Reachability startNotifier] in Reachability.o
"_SCErrorString", referenced from:
  -[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilitySetDispatchQueue", referenced from:
  -[Reachability startNotifier] in Reachability.o
  -[Reachability stopNotifier] in Reachability.o
"_SCNetworkReachabilityGetFlags", referenced from:
  -[Reachability isReachable] in Reachability.o
  -[Reachability isReachableViaWWAN] in Reachability.o
  -[Reachability isReachableViaWiFi] in Reachability.o
  -[Reachability connectionRequired] in Reachability.o
  -[Reachability isConnectionOnDemand] in Reachability.o
  -[Reachability isInterventionRequired] in Reachability.o
  -[Reachability reachabilityFlags] in Reachability.o

How can I solve this problem?

  • Swift call class function from corresponding subclass in superclass function
  • #ifdef #else #endif choose iOS sdk version and function?
  • Sum array of unsigned 8-bit integers using the Accelerate framework
  • Get properties of Kontakt iBeacon
  • UIBackButton Background Image not appearing
  • Get specific Value between Javascript Function by NSRegularExpression?
  • 3 Solutions Collect From Internet About “Strange errors in Apple's Reachability files”

    Probably you forgot to add the SystemConfiguration.framework to your project. If you don’t know how to add a framework have a look at this SO question.

    Add these frameworks..
    SystemConfiguration.framework
    Security.framework
    CFNetwork.framework

    I’ve had the same error when I added the Reachability .h and .m files.

    The solution is to make sure that the Reachability .m gets compiled along with the rest of your .m files. You need to do this.

    1. Click on the project navigator – the folder icon on the left-top corner under the play/stop button.
    2. Choose the target
    3. Click on “Build Phases”.
    4. Click on the “+” icon. And add the Reachability.m file to your compile sources.