Xcodev12.5-打开SQliteDB时出现构建错误
在将 Xcode 从 v12.4 升级到 12.5 后,在 React-Native 项目上工作,出现构建错误。用于在 Xcode v12.4 中完美运行
我已经缩小到导致此构建错误的行:
var db: OpaquePointer?
let _path = path ?? "widgetdb.sqlite3";
sqlite3_open(_path, &db) <-- This is the culprit!
错误日志:
Undefined symbols for architecture x86_64:
"Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer<A>) -> (Swift.IndexingIterator<Swift._ArrayBuffer<A>>, Swift.Int)", referenced from:
generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray<A where A: Swift.Collection>(A) -> Swift.ContiguousArray<A.Element> in SQLiteDatabase.o
任何帮助将不胜感激!谢谢!!
回答
今天遇到了类似的问题,但错误出在 Alamofire
在我的情况下,我通过删除来解决它
""$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)""
来自项目搜索路径中的 LIBRARY_SEARCH_PATHS