try conversation.queryMessage(limit: limit, policy: .onlyCache, completion: { })
iOS SDK 的缓存是默认开启的,并没有关闭缓存。当使用上面的 API 获取本地缓存时候,会报错:
LCError(code: 9976, reason: Optional("Local Storage not open."), userInfo: nil, underlyingError: nil)
没找多相关解决方案,请解答!
SDK 版本信息:
- LeanCloud (16.3.0):
- LeanCloud/IM (= 16.3.0)
- LeanCloud/Storage (= 16.3.0)
- LeanCloud/IM (16.3.0):
- FMDB (~> 2.7.0)
- LeanCloud/Storage
- Starscream (~> 3.1.0)
- SwiftProtobuf (~> 1.5.0)
- LeanCloud/Storage (16.3.0):
- Alamofire (~> 4.8.0)