Friday 15 May 2015

firebase - Observe reference removal -



firebase - Observe reference removal -

i have simple question.

i have reference : /myref set value illustration : "hello"

and want hear when myref reference removed.

i tried observesingleevent kid removed not triggered there no child. , don't want hear parent reference until kid removed myref.

do have solution ?

thanking in advance.

you don't want observe kid events, watch path , nsnull (which means path no longer exists):

firebase *postsref = [[firebase alloc] initwithurl: @"https://docs-examples.firebaseio.com/web/saving-data/fireblog/posts"]; feventtypechildadded event // triggered before point. [postsref observesingleeventoftype:feventtypevalue withblock:^(fdatasnapshot *snapshot) { if (snapshot.value == [nsnull null]) nslog(@"value removed"); }];

firebase

No comments:

Post a Comment