Currently the type of results in completion handler of performQuery is NSArray *. It makes us developers need to force cast the results to [SKYRecord] in Swift every time
i.e.
for todo in results as! [SKYRecord] {
print ("Got a todo \(todo["title"])")
}
which is pretty ignoring.
We can easily fix that by change the type of results to NSArray<SKYRecord *> *.
Currently the type of
results
in completion handler ofperformQuery
isNSArray *
. It makes us developers need to force cast theresults
to[SKYRecord]
in Swift every time i.e.which is pretty ignoring.
We can easily fix that by change the type of
results
toNSArray<SKYRecord *> *
.