我想在我的 ios swift 应用程序中使用 couchbase,因此将 couchbase pod 安装到我的项目中。
还将所有头文件添加到 Bridging-Header 文件中,但编译器无法解析这些头文件的链接,并且无法找到 CBLManager 类。
桥接头文件 - 尝试 1
#import "CouchbaseLiteListener.framework/Headers/CBLListener.h"
#import "CouchbaseLite.framework/Headers/CBLAttachment.h"
#import "CouchbaseLite.framework/Headers/CBLAuthenticator.h"
#import "CouchbaseLite.framework/Headers/CBLDatabase.h"
#import "CouchbaseLite.framework/Headers/CBLDatabaseChange.h"
#import "CouchbaseLite.framework/Headers/CBLDocument.h"
#import "CouchbaseLite.framework/Headers/CBLGeometry.h"
#import "CouchbaseLite.framework/Headers/CBLJSON.h"
#import "CouchbaseLite.framework/Headers/CBLManager.h"
#import "CouchbaseLite.framework/Headers/CBLModel.h"
#import "CouchbaseLite.framework/Headers/CBLModelFactory.h"
#import "CouchbaseLite.framework/Headers/CBLQuery.h"
#import "CouchbaseLite.framework/Headers/CBLQuery+FullTextSearch.h"
#import "CouchbaseLite.framework/Headers/CBLQuery+Geo.h"
#import "CouchbaseLite.framework/Headers/CBLReplication.h"
#import "CouchbaseLite.framework/Headers/CBLRevision.h"
#import "CouchbaseLite.framework/Headers/CBLUITableSource.h"
#import "CouchbaseLite.framework/Headers/CBLView.h"
#import "CouchbaseLite.framework/Headers/CouchbaseLite.h"
#import "CouchbaseLite.framework/Headers/MYDynamicObject.h"
桥接头文件 - 尝试 2
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLiteListener.framework/Headers/CBLListener.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLAttachment.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLAuthenticator.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLDatabase.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLDatabaseChange.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLDocument.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLGeometry.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLJSON.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLManager.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLModel.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLModelFactory.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLQuery.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLQuery+FullTextSearch.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLQuery+Geo.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLReplication.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLRevision.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLUITableSource.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CBLView.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/CouchbaseLite.h"
#import "Pods/couchbase-lite-ios/Frameworks/CouchbaseLite.framework/Headers/MYDynamicObject.h"
我已经对 AFNetworking 做了同样的事情,而且效果很好。