SkygearIO / skygear-SDK-iOS

Skygear SDK for iOS
https://skygear.io
Other
10 stars 28 forks source link

`results` in completion handler of `performQuery` should be typed #210

Open cychiuae opened 6 years ago

cychiuae commented 6 years ago

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 *> *.