나는 Firebase에 초보자입니다. 데이터베이스에서 데이터를 가져 오려고하지만 코드가 작동하지 않습니다.Firebase에서 데이터를 얻는 방법은 무엇입니까?
- (void) getData{
FIRDatabaseReference *ref = [[FIRDatabase database] reference];
//READ DATA
[[[ref child:@"buysell"] child:@"users"] observeEventType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot * _Nonnull snapshot) {
NSDictionary *dict = snapshot.value;
NSLog(@"%@",dict);
} withCancelBlock:^(NSError * _Nonnull error) {
}];
}
그것은 withBlock:^(FIRDataSnapshot * _Nonnull snapshot)
에 뛰어 어차피 : 여기 내 코드입니다. 뭐가 잘못 됐어? 도와주세요. 감사.
configu 빨간색 제대로? 나는 그들의 지침에 따라 의미합니다. –
Google의 문서를 참조하십시오. [link] (https://firebase.google.com/docs/database/ios/read-and-write) – Rin