ref.child("users").child("").observeSingleEvent(of: .value, with: { (snapshot) in
// Get user value
let value = snapshot.value as? NSDicitionary <===
Use of undeclared type 'NSDicitionary'と表示されます
let username = value?["username"] as? string ?? ""
print(username)
エラーの解除方法を教えて戴けないでしょうか
NSDicitionary
と記載されているので、実際のソースコードにもそのように記載されているのでしょうか。NSDictionary
だろうと思います。慣れないと見極めが難しいかもしれませんが、NSDictionary
のように基本的なライブラリに含まれているはずの型名がundeclaredとかundefinedとか表示される場合は、綴りミスかimportが足りないかのどちらかです。よーくお確かめの上でご質問いただいた方が良いでしょう。