类型AuthDataResult的值没有成员providerID-Firebase 5.0.0

时间:2018-07-28 18:01:45

标签: ios swift firebase firebase-authentication

我遇到了这个令人沮丧的问题。令人恼火的是,他们很少或根本没有特定的文档来为Firebase进行这样的更新。我遇到了同样的错误:类型'AuthDataResult'的值没有成员'providerID'。这是我的代码:

                    if let user = user {
                        if self.segmentedControl.selectedSegmentIndex == 0 {
                            let userData = ["provider": user.providerID] as [String: Any]
                            DataService.instance.createFirebaseDBUser(uid: user.uid, userData: userData, isDriver: false)
                        } else {
                            let userData = ["provider": user.providerID, USER_IS_DRIVER: true, ACCOUNT_PICKUP_MODE_ENABLED: false, DRIVER_IS_ON_TRIP: false] as [String: Any]
                            DataService.instance.createFirebaseDBUser(uid: user.uid, userData: userData, isDriver: true)
                        }
                    }

0 个答案:

没有答案