Warning: failed to set breakpoint site at 0x104b30764 for breakpoint 4.1: error sending the breakpoint request

warning: failed to set breakpoint site at 0x104b30764 for breakpoint 4.1: error sending the breakpoint request

**The error is on this code
storageRef.putData(imgData!, metadata: metaData) { (metaData, error) in
**
can someone help me to understand what is wrong

func uploadImage(_ image:UIImage, completion: @escaping ((_ url: URL?) -> ())){
let storageRef = Storage.storage().reference().child("myimage.png")
let imgData = myimageView.image?.pngData()
let metaData = StorageMetadata()
metaData.contentType = "image/png"
storageRef.putData(imgData!, metadata: metaData) { (metaData, error) in
if error == nil{
print("success")
storageRef.downloadURL(completion: { (url, error) in
completion(url)
})
} else{
print("error in save image")
completion(nil)
}
}
}

Terms of Service

Privacy Policy

Cookie Policy