找到问题了,"query.getFirst"不能获取ACL值,而find是可以获取ACL值的:
let query = LCQuery(className: "Todo")
query.includeACL = true
query.whereKey("aa", .equalTo("rr"))
_ = query.find { result in
switch result {
case .success(objects: let todo):
print("todo.first?.ACL.jsonValue (todo.first?.ACL?.jsonValue)")
break
case .failure(error: let error):
print(error)
}
}
打印结果为:
todo.first?.ACL.jsonValue Optional(["*": ["write": true, "read": true]])