Swift和Firebase数据库-调用中缺少参数标签'andPriority'

时间:2018-09-08 03:41:18

标签: swift firebase firebase-realtime-database firebase-authentication

当用户在应用程序中注册时,下面的代码用于更新我的Firebase数据库,它是为了在数据库中对用户进行身份验证并保存一个布尔值。实施此操作时,我收到以下错误(见下文)。

@IBAction func signupPressed(_ sender: UIButton) {

        Auth.auth().createUser(withEmail: emailEntryField.text!, password: passwordEntryField.text!) { (user, error) in
            if error == nil {

                //Show SVProgressHUD
                SVProgressHUD.show()

                //save User to Database
                let newUserInfo : [String:Any] = ["email":self.emailEntryField.text!, "state":true]
                self.ref.child("users").child(user?.user.uid).setValue(newUserInfo, withCompletionBlock: { (error, ref) in
                    print("New User Saved")
                }

                //Dismiss SVProgressHUD
                SVProgressHUD.dismiss()

                //move to info view controller
                self.performSegue(withIdentifier: "signupToInfo", sender: self)

            } else {

                print("Signup Unsuccessul")
                let alertController = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: .alert)
                let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil)

                alertController.addAction(defaultAction)
                self.present(alertController, animated: true, completion: nil)

            }
        }
    }

enter image description here enter image description here

1 个答案:

答案 0 :(得分:1)

该块之后缺少

@org_tensorflow//tensorflow/core/platform/hadoop:hadoop_file_system

添加),就像这样

cc_test(
    name = "get_model_status_impl_test",
    size = "medium",
    srcs = ["get_model_status_impl_test.cc"],
    data = [
        "//tensorflow_serving/servables/tensorflow/testdata:saved_model_half_plus_two_2_versions",
    ],
    deps = [
        ":get_model_status_impl",
        ":model_platform_types",
        ":platform_config_util",
        ":server_core",
        "//tensorflow_serving/apis:model_proto",
        "//tensorflow_serving/core:availability_preserving_policy",
        "//tensorflow_serving/core/test_util:test_main",
        "//tensorflow_serving/servables/tensorflow:saved_model_bundle_source_adapter_proto",
        "//tensorflow_serving/servables/tensorflow:session_bundle_config_proto",
        "//tensorflow_serving/servables/tensorflow:session_bundle_source_adapter_proto",
        "//tensorflow_serving/test_util",
        "@org_tensorflow//tensorflow/cc/saved_model:loader",
        "@org_tensorflow//tensorflow/cc/saved_model:signature_constants",
        "@org_tensorflow//tensorflow/contrib/session_bundle",
        "@org_tensorflow//tensorflow/core:test",
        "@org_tensorflow//tensorflow/core/platform/hadoop:hadoop_file_system",
    ],
)

希望有帮助