missing required architecture armv7 in file?
Asked Answered
T

7

27

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.

Tarrant answered 27/4, 2012 at 9:8 Comment(0)
G
67

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.

Gann answered 23/5, 2012 at 1:51 Comment(6)
You, my friend, rock. This took 30 seconds and instantly solved it for me. Thanks.Winterkill
Thanks for this! You just saved me from what could have been a long afternoon :)Elevated
Worked for me as well. I think this is the right answer.Pahari
Just realized I'd never actually accepted this as the correct answer.Tarrant
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 !!Antares
@Siobhan the solution that you point here is deserving more than a plus I'd give 10+ really change my project from uncompilable to compilable. XcodBascom
B
10

Happened to me when I was including a framework that was built using Carthage and it's deployment target has been set to iOS 11 but I was building for iOS 9. Therefore the 32-bit architectures (armv7, i386) were missing. I have changed the deployment target for that framework to iOS 9 and that fixed my problem.

Bookrest answered 4/3, 2018 at 13:32 Comment(1)
Thanks this helped alot! Same issue for me.Need
A
4

This problem is related to the XCode messing up debugging, profile and final release files, when trying to get a shorter build time reusing old files.

That's why an architecture is missing (and it's probably the opposite of what you've already used), because XCode is trying to reuse some previous files that it built for a single architecture.

Clean your project in XCode (⇧ + ⌘ + K) and try to clean all other third-party libraries as well. After that, try to rebuild your app directly in the desired release mode. This worked 100% times without the need to restart XCode.

XCode stinks, what else could I say??

Aspidistra answered 30/11, 2020 at 22:0 Comment(1)
This solved it for me, thanks!Nonchalant
B
1

Pls make sure to add all the necessary library to build your app. this error seems like you have missed some files..

Beverlee answered 27/4, 2012 at 9:43 Comment(0)
H
0

Add army in your project ( Path => Project tittle(select Xcode blue color reject title) -> Build Setting -> ARCHS) in this ARCHS if you don't have armv7 than add it...

Hope,this will help you..

Hyrax answered 27/4, 2012 at 9:13 Comment(0)
C
0

I had the same issue for the framework Twilio Chat client. And when I went into carthage folder and inside it open the Info.plist file for Twilio Chat client framework the minimum deployment target was set to 11.0 but I was developing application for 10.0 so it was missing those architectures.

How I resolved: I downgraded my Twilio Chat Client framework to earlier versions where deployment target was set to 9.0 and boom it works.

Coterminous answered 6/4, 2020 at 5:19 Comment(0)
E
-1

Go To Click on the project icon-> Targets -> Build Settings -> Architectures

Click -> other + and add armv6 in the specified column...

Clean and Build

Exultant answered 27/4, 2012 at 9:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.