Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no ad was available Apple TV os #653

Closed
primeappsin opened this issue Jun 13, 2017 · 4 comments
Closed

no ad was available Apple TV os #653

primeappsin opened this issue Jun 13, 2017 · 4 comments

Comments

@primeappsin
Copy link

primeappsin commented Jun 13, 2017

Always getting this block

 else {
        // no ad was available
    }
@primeappsin
Copy link
Author

My code is

var avPlayer: AVPlayer!
override func viewDidLoad() {
super.viewDidLoad()
avPlayer = AVPlayer()
SpotX.ad(forChannel: "85394", params: [:]) { (ad, err) in

    if let _ = ad {
            // play the ad immediately in the given player.
            ad?.play(self.avPlayer, completion: {
                
            })
        }
        else if let _ = err {
            // underlying transmission error
        }
        else {
            // no ad was available
        }
    }

}

@zenangst
Copy link
Owner

@primeappsin hey man, I'm a bit confused by this issue, I don't see how it is related to the Spots framework 😎 do you have this mixed up with something else or do you care to share some additional light on what it is that you are doing?

@primeappsin
Copy link
Author

primeappsin commented Jun 14, 2017

This is iOS Swift 3 code

let params = ["" : ""]
SpotX.ad(forChannel: "197544", params: params) { (ad, err) in
if let _ = ad {
// play the ad immediately in the given player.
ad?.play(self.avPlayer, completion: {

        })
    }
    else if let _ = err {
        // underlying transmission error
    }
    else {
        // no ad was available
    }

@zenangst
Copy link
Owner

@primeappsin seems like you have this framework mixed up with this one - https://cocoapods.org/pods/SpotX-SDK, I suggest you reach out to them instead.
I'm gonna go ahead and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants