2016-02-13 49 views

回答

1

我製作了一個小的應用程序複製的問題(ObjC代碼遵循)

以觀察auth'ing的代碼是:

[myRootRef observeAuthEventWithBlock:^(FAuthData *authData) { 
    NSLog(@"got an auth event"); 
}]; 

,我們有子節點

child = [myRootRef childByAppendingPath:@"child_path"]; 

則初始AUTH是

[myRootRef authUser:@"[email protected]" password:@"pw" withCompletionBlock:^(NSError *error, FAuthData *authData) { 

     NSLog(@"authentication 1 success"); 
     [child removeAllObservers]; 
     [self doAuth]; 
    } 
}]; 

的doAuth方法簡單權威性的其他用戶,並輸出「驗證成功2」

got an auth event 
got an auth event 
authentication 1 success 
authentication 2 success 

因此,大家可以看到它的工作如廣告 - 我無法複製的問題。我的猜測是錯誤可能在於你的代碼中的其他地方。

+0

好的,會檢查其他可能的原因。謝謝! – rishramanathan