Vimeo video upload crashing in Swift when upload video to the server

391 views Asked by At

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.

enter image description here

1

There are 1 answers

1
mag_zbc On

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
}