我正在尝试从当前日期开始3天范围内从核心数据中获取数据
let timestampToday = Int(Date().timeIntervalSince1970)
let predicate = NSPredicate(format: "timestamp >= %@ AND timestamp < %@", Int(timestampToday - Constants.THREE_DAYS), timestampToday)
let request: NSFetchRequest<HealthKit> = HealthKit.fetchRequest()
do{
request.predicate = predicate
let test = try context.fetch(request)
}catch{ ...}
}
我得到一个没有任何描述的(lldb),这行以红色突出显示。因此,很明显,谓词是这里的主要问题。我在做什么错了?