Код: Выделить всё
func someFunc() {
if let managedContext = context ?? managedContext {
let fetchRequest: NSFetchRequest = Groups.fetchRequest()
fetchRequest.predicate = NSPredicate(format: "name = %@", group.name)
do {
let results = try managedContext.fetch(fetchRequest) -----> warning appears on this line
// Processing results
} catch {
throw error
}
}
}
Код: Выделить всё
{"message":"This code path does data processing on the main thread. Consider ways to optimize this code path","antipattern trigger":"-[NSManagedObjectContext executeFetchRequest:error:]","message type":"suppressable","show in console":"0"}
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/785 ... g-after-up