【发布时间】:2019-03-12 14:37:31
【问题描述】:
我正在关注 MongoDB 提供的 Build a Mobile App With Sync 教程,但在特定集合上配置同步时遇到错误。这是我的代码:
todoCollection.sync.configure(
conflictHandler: DefaultConflictHandlers.remoteWins.resolveConflict,
changeEventDelegate: { documentId, event in
if !event.hasUncommittedWrites {
// you can add code here to update your app's UI or
// perform other operations based on a document change.
}
}, errorListener: self.on)
这些是我的导入:
import MongoSwift
import StitchCore
import StitchRemoteMongoDBService
我有一些理论,比如需要单独导入,或者我的 XCode 索引刚刚损坏,但到目前为止没有成功。
编辑:我正在使用pod 'StitchSDK', '~> 5.0.0'
【问题讨论】:
标签: swift mongodb mongodb-stitch