【发布时间】:2020-09-29 13:55:57
【问题描述】:
static func signUp(username: String, email: String, password: String, imageData: Data, onSuccess: @escaping () -> Void, onError: @escaping (_ errorMessage: String?) -> Void) {
Auth().createUser(withEmail: email, password: password, completion: { if error != nil {
onError(error!.localizedDescription)
return
}
let uid = user?.uid
let storageRef = Storage.storage().reference(forURL: Config.STORAGE_ROOF_REF).child("profile_image").child(uid!)
storageRef.put(imageData, metadata: nil, completion: { (metadata, error) in
if error != nil {
return
}
【问题讨论】:
-
您有问题吗?您刚刚发布了一段代码,没有任何解释。我猜这是 Firebase,但你也应该提到