Undefined symbols for architecture arm64: _SCNetworkReachabilityGetFlags
I got this rather cryptic error when trying to include the Criticism SDK in an IOS app:
Undefined symbols for architecture arm64:
“_SCNetworkReachabilityGetFlags”, referenced from:
-[CRReachability connectionRequired] in libCrittercism_v5_2_0.a(CRReachability.o)
-[CRReachability currentReachabilityStatus] in libCrittercism_v5_2_0.a(CRReachability.o)
“_SCNetworkReachabilityScheduleWithRunLoop”, referenced from:
-[CRReachability startNotifier] in libCrittercism_v5_2_0.a(CRReachability.o)
“_SCNetworkReachabilityUnscheduleFromRunLoop”, referenced from:
-[CRReachability stopNotifier] in libCrittercism_v5_2_0.a(CRReachability.o)
“_SCNetworkReachabilitySetCallback”, referenced from:
-[CRReachability startNotifier] in libCrittercism_v5_2_0.a(CRReachability.o)
“_SCNetworkReachabilityCreateWithAddress”, referenced from:
+[CRReachability reachabilityWithAddress:withKey:] in libCrittercism_v5_2_0.a(CRReachability.o)
“_SCNetworkReachabilityCreateWithName”, referenced from:
+[CRReachability reachabilityForHostName:withNotificationKey:] in libCrittercism_v5_2_0.a(CRReachability.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The solution was to include the SystemConfiguration framework in the project.
– Simple, if the error message wasn’t so bloody cryptic!