I am trying to delete an object with multiple children in my Firebase database. My data is setup like so:
I am running the following code in my iOS app:
[[ref child:[NSString stringWithFormat:@"/playlistSongs/%@", playlistObject[@"firebaseID"], nil]] removeValueWithCompletionBlock:^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
if (error) {
NSLog(@"ERROR: %@", error.localizedDescription);
} else {
NSLog(@"DELETED!");
}
}];
When this code runs, DELETED! is outputted in the log. However the object still remains in my firebase database. Is it possible to delete objects with multiple children? Looking at the documentation here, it suggests that I should be able to do so. It would be great if someone could point me in the right direction.
Aucun commentaire:
Enregistrer un commentaire