I'm developing a Flutter app and getting this error. I have tried flutter clean, rm podfile, pod deintegrate, removed podfile.lock, but non seem to fix.
The full error message in Xcode is as follows:
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_GeneratedPluginRegistrant", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I dumped the whole ios file and re-created it using flutter create . at the project directory level. I just dragged the "ios" folder to the trash, then ran the command above at the command line. I am guessing there was a file somewhere with an incorrect package name since I changed my package name to remove the "example" within the "com.example.". Note to self: choose one project name and leave it as is!
Related
Building failed with Xcode 13beta for React Native 0.64.2 project. It is on macOS Big Sur. The detail of error is:
Undefined symbols for architecture x86_64:
"__swift_FORCE_LOAD_$_swiftFileProvider", referenced from:
__swift_FORCE_LOAD_$_swiftFileProvider_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftFileProvider_$_YogaKit)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What configuration change is needed to eliminate the error?
Create an empty swift file (####.swift) from Xcode in the main project which located Appdelegate.h file. This worked for my React Native project after Xcode version 13 update.
Try creating a new Swift empty file (it's not necessary to create a Bridging Header).
Adding libswiftWebKit.tbd into Link Binary With Libraries build phase in XCode helped to solve the problem:
enter image description here
Integrating CouchbaseLite in iOS application causing error through cocoapods . Here is error i am getting :
Undefined symbols for architecture x86_64: “OBJC_CLASS$_CBLManager”,
referenced from: objc-class-ref in ViewController.o ld: symbol(s) not
found for architecture x86_64 clang: error: linker command failed with
exit code 1 (use -v to see invocation)
I also raised issue on couchbase-lite forum :
https://forums.couchbase.com/t/bjc-class-ref-error-in-couchbase-lite-in-ios-cocoapods-xcode-9/14744?u=st.shubh.tiwari
The “Other Linker” flags was set to “-ObjC”. Change that to $(inherited). That will ensure that Cocoapods is able to include the appropriate flags. Otherwise your cocoa pods install won’t go through fine.
This really helps me to resolve my issue . Big Thanks to CouchBase community.
I'm trying to use the MWPhotoBrowser project in my project. I followed the whole installation process and was able to import the MWPhotoBrowser.h file. When I tried to build, I run into this error...
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MWPhotoBrowser", referenced from:
objc-class-ref in PhotoBrowserViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know how to resolve this?
Thanks
For anyone getting this issue...Please check if you correctly linked your project to the libMWPhotoBrowser.a file under Build Phases in your target settings !
When I deploy my app to my phone via xcode5 it works find, however when I try to deploy it to one of the simulators I get the following errors.
ld: warning: ignoring file /Users/benpearce/Downloads/MapKit.framework/MapKit, missing required architecture i386 in file /Users/benpearce/Downloads/MapKit.framework/MapKit (2 slices)
Undefined symbols for architecture i386:
"_MKCoordinateRegionMakeWithDistance", referenced from:
-[MapKitView createViewWithOptions:] in MapKit.o
"_OBJC_CLASS_$_MKMapView", referenced from:
objc-class-ref in MapKit.o
"_OBJC_CLASS_$_MKPinAnnotationView", referenced from:
objc-class-ref in MapKit.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone see what's going on?
The MapKit framework is missing a binary for the Simulator which is i386. The Simulator is a Mac application and needs a code resource compiled for the i386 Intel processor. Where did you get MapKit?
If this is Apple's MapKit you should just be including the framework provided with Xcode. It is added in Xcode by selecting the Project, Build Phases, Link Binaries with Libraries, +, select MapKit.framework.
Also the framework in in your Downloads directory, why?
I have linked the target file of my project to the coredata.framework in the Build Phases.
But still I am getting 3 linker errors like below:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CoreDataTableViewController", referenced from:
_OBJC_CLASS_$_RolesTableViewController in RolesTableViewController.o
"_OBJC_METACLASS_$_CoreDataTableViewController", referenced from:
_OBJC_METACLASS_$_RolesTableViewController in RolesTableViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am getting this problem in 2 coredata examples i was following from the tutorials. I tried to find if i missed a step. I think I am doing some small fundamental error...
Please help, what it could be...
I'm sure this is solved now, but I had the same problem. When you copy the files to your project you need to ensure you put a check next to your project under "Add to targets".