I keep getting this warning and errors can anyone help?
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms /iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks//SystemConfiguration.framework/SystemConfiguration, missing required architecture armv7 in file
Undefined symbols for architecture armv7:
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[Reachability reachabilityWithAddress:] in Reachability.o
"_SCNetworkReachabilityCreateWithName", referenced from:
+[Reachability reachabilityWithHostName:] in Reachability.o
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[Reachability stopNotifier] in Reachability.o
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilitySetCallback", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilityGetFlags", referenced from:
-[Reachability connectionRequired] in Reachability.o
-[Reachability currentReachabilityStatus] in Reachability.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My app workings fine in the Simulator I don't get this it is just when I build to the phone.
You need to link against the SystemConfiguration framework. Select your project in Xcode's project navigator, select your app target, and select the Build Phases tab. Under Link Binary With Libraries, click on the "+" button and choose SystemConfiguration.framework.
There may be other framework dependencies that you need to add in the same way, but adding SystemConfiguration is what fixed the same errors for me.
ETA: I jumped right to the errors and didn't see the ld warning at the top of the paste. If you're already linking to SystemConfiguration, maybe try removing and re-adding it, and if all else fails, update Xcode. The most recent release definitely has the right architecture, so it sounds to me like either your project is looking in the wrong place or something's wrong with the framework itself.
You, my friend, rock. This took 30 seconds and instantly solved it for me. Thanks.
Thanks for this! You just saved me from what could have been a long afternoon :)
Worked for me as well. I think this is the right answer.
Just realized I'd never actually accepted this as the correct answer.
Sigh. It's 2016. WHY doesn't Xcode help us to get around issues like this, rather than squirting out vague error messages ?! I noticed yesterday that the apple.com/feedback website lets you give feedback on all Apple hardware and software, EXCEPT Xcode. Funny, that... Anyway, thank you - this perfectly fixed my problem !!