'SnapSDK integration not working properly, Snapshot shows error: Something went wrong. Please try again later

I followed all the steps from documentation and integrated SnapSDK in my iOS app but when I click the share button in my app it directs me to the snapchat but ends up with an error saying

"Something went wrong please try again later".

 private func didTapSnapchatShare(cell: FeedTableViewCell){

    print("Share  button tapped ")
    cell.pauseVideoAndAnimation()
    showProgressIndicator(view: self.view)
    var watermarkStr = ""
    if let userName = cell.cellDataSource?.user?.name {
        watermarkStr = userName
    }
    let promptImage = cell.promptView?.asImage()
    cell.slPlayer?.exportVideo(withWatermarkString: watermarkStr, promptImage: promptImage, completionHandler: { status, filePathURL in
        DispatchQueue.main.async {
            hideProgressIndicator(view: self.view)


            if status, let filePathURL = filePathURL {

                let url = URL(string: "snapchat://")!
                if(!UIApplication.shared.canOpenURL(url)){

                    if let reviewURL = URL(string: "https://itunes.apple.com/us/app/snapchat/id447188370?mt=8"), UIApplication.shared.canOpenURL(reviewURL) {
                        if #available(iOS 10.0, *) {
                            UIApplication.shared.open(reviewURL, options: [:], completionHandler: nil)
                        } else {
                            UIApplication.shared.openURL(reviewURL)
                        }

                        return
                    }
                }
                let video = SCSDKSnapVideo(videoUrl:filePathURL)

                let videoContent = SCSDKVideoSnapContent.init(snapVideo: video)
                let api = SCSDKSnapAPI(content: videoContent)
                api.startSnapping(completionHandler: { (error: Error?) in
                    print(error?.localizedDescription)
                })
            }
        }
    })
}


Solution 1:[1]

Check if your file path url is correct or not this happens when we are not using the correct file path sdk will not be able to find the image.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kartik Malhotra