The playgrounds demonstrate how to use most the SDKs functionality. DeleteAll is here:
//: Asynchronously (preferred way) deleteAll GameScores based on it's objectId alone.
[scoreToFetch, score2ToFetch].deleteAll { result in
switch result {
case .success(let deletedScores):
deletedScores.forEach { result in
switch result {
case .success:
print("Successfully deleted score")
case .failure(let error):
print("Error deleting: \(error)")
}
}
case .failure(let error):
assertionFailure("Error deleting: \(error)")
}
}
Deleting a file is similar to the other SDKs and requires the masterKey which the documentation states . This type of functionality should only be used server side. To use the Swift SDK for cloud code see here:
Version 4.6.0 of the Swift SDK allows you to write Parse Cloud Code Functions and Triggers completely in Swift by taking advantage of Parse Webhooks.
https://github.com/parse-community/Parse-Swift/releases/tag/4.6.0
Using the Swift SDK on the server-side allows you to send Push Notifications, create/modify schema’s, delete files, etc. To quickly get a Swift server that can connect to your nodejs Parse Server up and running quickly, fork the repo:
Have fun writing Swift Cloud Code!