I'm trying to assign a profile picture in app through a UIImagePickerController. However, I need to figure out a way to store the image so it still appears after the apps restarts.
I've tried other methods, primarily the ones that use UIImagePNGRepresentation. But this no longer exists in Swift 4+, so I need some other method.
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any])
{
picker.dismiss(animated: true)
profilePicture = info[.editedImage] as! UIImage
}
}
What I want to do, is still display the image as a profile picture. But when the app restarts, still have the image appear. Since this is from the camera roll, I can't store it in the .xcassets