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

1

10

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)
                })
            }
        }
    })
}
Duramen answered 8/5, 2019 at 10:57 Comment(4)
SnapKit is an autolayout library...why is it tagged here?Submersible
Did you ever find a solution? I am getting the same thing.Scallion
Did you find a solution?Mcdavid
@MicahMontoya hi you are required to add in your snapchat ID in the development portal as a demo/tester user, in order to make video sharing work.Comprehensible
E
0

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.

Enswathe answered 19/4, 2022 at 4:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.