An adapter to track events and send them to the Youbora to build the analytics
Insert into your Podfile
pod 'YouboraSpotXPlayerAdapter'
and then run
pod install
import YouboraSpotXPlayerAdapter
// Intialize
let adPlayer = SpotXInterstitialAdPlayer()
// Add to plugin
guard let adapter = YBSpotXPlayerAdAdapterManager(player: adPlayer, delegate: delegate).getAdapter() as? YBPlayerAdapter<AnyObject> else {
return
}
self.plugin.adsAdapter = adapter
#import <YouboraSpotXPlayerAdapter/YouboraSpotXPlayerAdapter-Swift.h>
YBSpotXPlayerAdAdapterManager *adapterManger = [[YBSpotXPlayerAdAdapterManager alloc] initWithPlayer:self.player];
YBOptions *options = [YouboraConfigManager getOptions];
self.plugin = [[YBPlugin alloc] initWithOptions:options andAdapter:[adapterManger getAdapter]];
For more information you can check the examples in the folder ./Samples/Swift for swift and for obj-c ./Samples/Objc