Hi I want users to be able to Register even if they don't choose a profile picture
Right now I use this code for the profile picture:
let profileImageData = UIImageJPEGRepresentation((userImage.image!), 1)
if (profileImageData != nil) {
let profileImageFile = PFFile (data: profileImageData!)
myUser.setObject(profileImageFile!, forKey: "profile_picture")
}
And each time a user don't choose a profile picture while registering I get this error
fatal error: unexpectedly found nil while unwrapping an Optional value
I want the user to be able to register even if the value is nil.
Thank you very much