Undefined symbols for architecture i386: trying to add in AVFoundation - ios

Attached is an error readout I've been getting. I've added the proper frameworks in my linked libraries, I've checked my target memberships for implementation files, I just don't know why I'm constantly getting the error below.
My project was building fine the other day, and when I opened up my computer the next morning and tried to build, I was given these error messages. I messed around with the architecture in my build settings, as per advice from other stack overflow questions, and it brought the number of errors from 20 down to 5. Still totally confused on this.

You are getting this error because you have not added AssetsLibrary in your project.
Add that library in "Link Binary With Libraries" your error will be gone.

Related

React Native iOS: undefined symbols for architecture

I know there are quite a few threads about this, but none seemed to help for me so far. My problem is i am getting a linker error for debug builds: Undefined symbols for architecture arm64:.
I used to have the opposite problem of duplicate symbols when trying to archive (debug was working then), i then noticed and removed duplicate dependencies manually linked and mentioned in my podfile (namely a lot of react native RCT...). Afterwards i was able to archive, but not to debug build anymore.
I tried a lot of different solutions, but i am still getting the same error. I have CxxBridge included in my podfile, i do clean before i try any of the solutions. But still no luck so far. This is very annoying at the moment. Does anybody have an idea?

Building static library and adding it to project

So I've been trying to add the Semantics3 objective-c code to a project I'm working on. I followed the directions they had on their Github page to no avail, I always get an Undefined symbols for architecture x86_64: linking error, even though prior to creating the builds i made sure valid architectures in build settings contained armv7 armv7s arm64 and that the right targets were selected. I also made sure I was adding the .a file that was in the universal folder in /Product. Not exactly knowing if I built their code right, however, I tried going through "adding a static library to your code" section in http://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial, I do everything correctly, the compiler finds the header files, but then after I add the static library, the project still won't build and I still get the same error. I read through numerous answers on SO and elsewhere online, and nothing I did seemed to fix the issue. What could be wrong?

Swift: Apple Mach-O Linker Error

I'm working on Parse/Facebook login that keeps giving me the following error:
Undefined symbols for architecture x86_64:
"_FBSDKAccessTokenDidChangeNotification", referenced from:
There are over 60+ such errors, not sure why they are appearing since this code is working in a different project. I was copying over some code and this started happening, any advice?
Check if you have the import part copied to your new project as well, so does the dependencies.
When it said undefined symbols, it means the function _FBSDKAccessTokenDidChangeNotification can't be found while compiling, which usually means the correspond framework/SDK/library were not there.
While I'm not sure what caused this issue, the following solution cleared up the error messages:
Go to the main page for the app (on the navigation thing on the left click on your apps name or the top section) -> Build Settings and under Linker Flags, make sure there is nothing in your Other Linker Flags

Stripe integration error Xcode 6.2

To be specific i get this error when i build my project after adding the stripe framework.The project is for the iOS platform.
I have all the standard architectures added to my build settings namely
armv7,armv7s. This is the error logged,
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_STPAPIClient", referenced from:
objc-class-ref in PlaceOrderViewController.o
After this error came i added arm64 also. I got error from this class alone as i'm calling a method from STPAPIClient.h in the Stripe framework.I have tried everywhere on the internet including stack and found nothing that could solve the issue.Hope someone can provide insights as to why this is occurring.
Okay so the solution for me was to copy the entire stripe project, stripe.xcodeproj into my project. This would only bring that file so to bring all the classes in stripe project I copied the stripe workspace,stripe.xcworkspace into my project folder.
This solved all architecture related issues.

How to add CocoaHTTPServer to an iOS project on XCode 4

I'm trying to add CocoaHTTPServer to my project. I encountered many problems on the way - my problem (adding CocoaHTTPServer to a project (and have it working)) is still there - but I've also included the errors and solutions I encountered on the way for others' reference.
First I looked at tutorials on adding a framework, but it didn't look like a framework.
Next I right clicked on my project (on the left sidebar), and manually added it with "add files". I followed the SimpleHTTPServer example but got a "cocoa/cocoa.h" not found error. I searched around and found that Cocoa is for mac and not iOS. But the CocoaHTTPServer description talks about iOS apps too, so I just deleted the samples folder (the error was coming from the DynamicHTTPServer example if I recall.
Then I got a "Lexical or preprocessor issue libxml/parser.h not found" error. I tried adding it as a framework, but that didn't work. I found this tutorial on adding libxml to the header search path (at the end), but I ended up with 46 "Apple Mach-O Linker Error _CFHTTPMessage..." errors, and I decided to ask my question here. I tried this answer but got many Apple Mach-O Linker Errors
I added CFNetwork and Security frameworks (project => build phases => link binary with libraries), and was left with 2 errors:
ld: warning: path '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/libxml2.dylib' following -F not a directory
Undefined symbols for architecture i386:
"_NSlog", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I see i386 which is intel, and not the ARM architecture on iDevices. However, the real problem was I mispelled NSLog (look carefully - it wasn't capitalized in the error message). When I googled this - other possible causes may be missing frameworks.
Now it compiles. When I run the sample application, I get the "server started on X port" and when I go to localhost:X I get the welcome/success screen. When I do the same on my project, I still get the "server started on X port" messages, but when I go to localhost:X the browser gives a "cannot connect" messages. No errors in the XCode console.
There are no errors from [httpServer start:&error] and httpServer.isRunning is true.
So what's the best way to add CocoaHTTPServer to my project? In terms of a clean setup - for example, when I inspect the sample iPhone project, I don't see any of the messy steps to add libxml - I don't even see libxml anywhere at all. And in terms of configuring everything so that it actually works and serves files. Right now, I'm suspecting there may be some project settings that need to be enabled for it to actually be a server.
While adding the external files, have you checked your project as a "Build Target"?

Resources