-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
The build of a Cordova iOS project which contains the aerogear-pushplugin-cordova fails unless the SystemConfiguration library is added through XCode.
Errors which appear during build:
Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithName", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libPods.a(AFHTTPClient.o)
"_SCNetworkReachabilityGetFlags", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libPods.a(AFHTTPClient.o)
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libPods.a(AFHTTPClient.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[AFHTTPClient startMonitoringNetworkReachability] in libPods.a(AFHTTPClient.o)
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[AFHTTPClient stopMonitoringNetworkReachability] in libPods.a(AFHTTPClient.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This issue seems similar to the one mentioned by mwessend@redhat.com https://github.com/AFNetworking/AFNetworking/issues/670
The workaround is:
1. Open workspace in Xcode
2. Build Phases --> Link Binaries With Libraries
3. Click +
4. Add the SystemConfiguration framework
I'm wondering whether the above procedure could be somehow automatized.