2016-12-07 2 views
0

Ich bin die Integration des SDK HeyZap auf einer iOS-Anwendung.HeyZap (SDK 10.2.1) IOS Delegate Funktion nicht

Ich kann() und show() ein IncentivizedAd.

Aber ich kann die Callback-Delegiertenfunktionen nicht verwenden.

Die drei Möglichkeiten für mich nicht funktionieren (Mitteilung, Abschluss auf (HZIncentivizedAd.ShowWithOptions) und mit HZAdsDelegate erklärte HZIncentivizedAdDelegate auf meiner Klasse.

class GridLigueController: MyViewController, UITableViewDataSource, HZAdsDelegate, HZIncentivizedAdDelegate { 

func didShowAdNotificationHandler() { 
    print("didShowAdNotificationHandler") 
} 

// Configure with NSNotification Listener 
// function called on viewDidLoad 
func configureRewardVideo() { 

    HZIncentivizedAd.setDelegate(self) 
    NSNotificationCenter.defaultCenter().addObserver(self, selector:#selector(didShowAdNotificationHandler), name:HZMediationDidShowAdNotification, object:nil) 
    if adRequestInProgress == false && HZIncentivizedAd.isAvailable() == false { 
     HZIncentivizedAd.fetch() 
     adRequestInProgress = true 
     print("[Debug] - adRequestInProgress...") 
    } else { 
     print("[Debug] - Reward video not ready : \(adRequestInProgress)") 
    } 

// Completion on showWithOptions 
func completion(success: Bool, error: NSError!) -> Void { 
    if success { 
     print("success showing an ad") 
    } else { 
     print("error showing an ad; error was %@",error) 
    } 
} 

func showAd() { 
    if HZIncentivizedAd.isAvailable() { 
     let options = HZShowOptions() 
     options.viewController = self 
     options.completion = self.completion 
     HZIncentivizedAd.showWithOptions(options) 
     print("[Debug] - HZIncentivizedAd video is ready, should be shown") 
    } else { // show an alert } 
} 

// Normal Delegate function 
func didReceiveAdWithTag(tag: String!) { 
    print("didReceiveAdWithTag") 
} 

func didShowAdWithTag(tag: String!) { 
    print("didShowAdWithTag") 
} 

func didFailToCompleteAdWithTag(tag: String!) { 
    print("didFailToCompleteAdWithTag") 
} 

func didCompleteAdWithTag(tag: String!) { 
    print("didCompleteAdWithTag") 
} 

} 

Habe ich etwas vergessen zu initialisieren? I verwenden Xcode 7.3.1 mit Swift 2.3

Dank für die Hilfe

Antwort

1

Heyzap 10.2.1 hatte tatsächlich ein Problem mit Rückrufen. Wir haben es kurz nach der Veröffentlichung von unserer Website entfernt und 10.2.2. out heute um es zu ersetzen. Entschuldigung wegen der Unannehmlichkeiten!

Quelle: Ich arbeite bei Heyzap

0

HeyZap schickte mir eine Nachricht und die SDK Version I verwendet (10.2.1) hatte ein Problem auf dem Rückruf.

Jetzt funktioniert das gut.