OfficeDev / Office-365-SDK-for-iOS

Microsoft Services SDKs for iOS Preview produced by MS Open Tech.
https://dev.office.com/
Other
96 stars 49 forks source link

Delete multi-items in List items #96

Closed tranhieutt closed 8 years ago

tranhieutt commented 8 years ago

Sorry, I have a question about delete function in SDK. If i want delete 1 item, folder or file, i can use source code:

[[[self.client.files getById:data.fileId] addCustomHeaderWithName:@"If-Match" value:@"*"] deleteWithCallback:^(int status, MSOrcError *error) {
        NSLog(@"OK");
}];

So, if I want to delete multi-item, question is:

If SDK doesn't support delete multi-item, I must use loop for. Ex: for (NSString *fileID in arrrayOfFileID) {

[[[self.client.files getById: fileID] addCustomHeaderWithName:@"If-Match" value:@"*"] deleteWithCallback:^(int status, MSOrcError *error) {
        NSLog(@"OK");
}];

}

I think solution above is not good for iOS app.

Please show me API can delete multi-items. Thank you.

anihojnadel commented 8 years ago

Hi @tranhieutt , the API doesn't support deleting multi-items. You should use the second approach.

Thanks!