The video actually gets uploaded but in the settings where title and description of video do not get updated at that time where the app crashes.
Here i am attaching screenshot where crashes happening.
The video actually gets uploaded but in the settings where title and description of video do not get updated at that time where the app crashes.
Here i am attaching screenshot where crashes happening.
Crash happens because either uploadTicket
, video
or uri
is nil
.You're using force unwrapping, and that will cause a crash if the value you're unwrapping is nil
. Try instead
if let videoUri = self.uploadTicket?.video?.uri {
// put rest of the code here
}