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)
Here is pod file :
pod ‘couchbase-lite-ios’, '~> 1.4.0’
this is this pod file , which i used in iOS project .
Apart from this , i also used Bridging header : #import “CouchbaseLite/CouchbaseLite.h” in CouchBaseDemo-Bridging-Header.h and set objective c header in project and target setting but still m getting same issue .
I took a look at your project and noticed a couple of issues in your project configuration. Fixing the issues , resolved the issue. See details below.
(Related Note: you may want to refer to this blog post that shows how you can get started with CBL and provides you with a starter app)
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 is what you have *
AFTER you fix the above, This is what you should see
Also, not specifically related but an issue nevertheless that will come to bite you later, I noticed that your bridging header path was hardcoded. Make sure that it’s not the case. The best way to add a bridging header is to add a ObjC .m file and when you do that, you will be prompted to add a bridging header . Make sure you accept that. The system will add a bridging header for your project and you can add the import file to it.