I am working on an iPhone app that includes a library for custom alert views. You can find the library here. Everything has been implemented properly and the app runs flawlessly on iPhone 6, 6+, and s models as well. However, whenever I try and run the app on the iPhone 4/4s and iPhone 5/5s there are errors related to the alert view library. The current deployment target is 9.3
Here are the error codes that I get:
Undefined symbols for architecture i386:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After many days of searching I have found a fix for this issue. Hold down option while cleaning your build. (located product > clean) in Xcode. This cleaned the build folder and now everything is working just fine!
Related
I'm trying to build a project that has ResearchKit in it, and whenever I build and run on a physical device (or the simulator, for that matter) it works fine. But when I attempt to Archive it, I get the following error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ORKVisualConsentStep", referenced from:
objc-class-ref in InformedConsent.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I followed the installation guidelines on the ResearchKit GitHub, and made sure to check that researchKit.framework was under the Frameworks, Libraries and Embedded Content section as well as the "Link Binary With Libraries" section of the build phases tab (as was described in this link as well as a couple others: Xcode build failure "Undefined symbols for architecture x86_64") but still nothing.
Is there something I'm doing wrong, or another setting I might be able to change?
UPDATE:
I noticed that the element that was throwing the error - ORKVisualConsentStep - was deprecated a few iOS versions ago. So by taking that out, I was able to get the project to archive.
I didn't want to put this as the accepted answer, though, because I wanted to see if there was a better solution than just deleting code.
Thanks for your help!
I have an app that I am using various other Frameworks and libraries in.
FacebookSDK, GoogleSignIn, libsqlite3
I have included these in my buildSettings and even put Facebook in my Frameworks path and libxml2 in the Header Search Path.
However when I build in the simulator I get 21 errors which say
"linker command failed with exit code 1
ld: symbol(s) not found for architecture i386
this only happens with the simulator not on any device.
I am attaching a screen shot.
Any ideas would help. I have look at a lot of questions with this with no solution.
The lines in yellow are telling you the problem. When you compile for the simulator you are producing i386 code, for a real device you are producing ARM code. The libraries you are using do not contain i386 code, hence the errors.
You need to obtain versions of the libraries with i386 code.
HTH
we have xcode 7.1.1, MobileFirst 7.1 and followed below link but for our hybrid application with apple watch (swift)
[https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/hello-world/configuring-a-native-ios-application-with-the-mfp-sdk/#localMethod][1]
Below is complete error received while we added WorklightAPI
"WorklightAPI/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation(WLProcedureInvocationData.o), building for watchOS simulator, but linking in object file built for iOS, for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)"
any idea how to resolve this ?
Do you build for watchOS1 or watchOS2? Currently watchOS2 is not supported
The error in my iOS 7 project, with a Deployment Target = 6.1, that uses the latest ZXingWidget:
Undefined symbols for architecture armv7:
"zxing::GreyscaleLuminanceSource::GreyscaleLuminanceSource(unsigned char*, int, int, int, int, int, int)", referenced from:
-[SSAColorCardReader readImage] in SSAColorCardReader.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The device connected to my Mac is iPhone 5S.
The project is setup as follows: In Target's Build Settings Architecture = Standard, Build Active Architecture Only = NO, and Valid Architectures = armv7.
A post that closely relates to my question and have tried the recommendations with no success is here (SO post). Reviewing this one and others like it and trying out their suggestions I still can't get past this one issue. update* Do you know what I might be doing wrong? *** The ScanTest app works when I compile it for iPhone 5S, so I'm hopeful a solution can be found.
I find a solution:On deployment target iOS7 there seems to be the need to set the compilers to C++ 11 (sdt) as well as libc++ (LLVM)
After switching those settings the build runs successfully
I'm using the iOS Kal API in my project. When I try to compile and run the project with my iPhone 4S or the iPhone 5 Simulator, it works perfectly but when I try it with a real iPhone 5, I get this error :
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/sebliberal/Dropbox/Appli FACE 06/Version iPhone/FACE06/Twitter+OAuth/Libraries & Headers/libOAuth.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I already searched for this error and I set YES for Build Active Architecture Only but I still have the error.. What's the problem ?
Thanks :)
Read this:
Framework (RestKit) not compatible with armv7s
This:
AdMob ARMv7s support
or This:
iOS - file does not contain an armv7s slice
Or one of many answers on SO and the internet.
The short answer is you need to either update your library or remove armv7s from your supported architectures.