@@ -219,7 +219,7 @@ typedef SWIFT_ENUM(NSInteger, CommanderWebViewState, closed) {
219219
220220
221221
222- @class TFACustomAdView ;
222+ @class TFAAdView ;
223223enum TeadsAdPlaybackState : NSInteger ;
224224
225225SWIFT_PROTOCOL (" _TtP8TeadsSDK13TFAAdDelegate_" )
@@ -229,61 +229,61 @@ SWIFT_PROTOCOL("_TtP8TeadsSDK13TFAAdDelegate_")
229229// /
230230// / \param adRatio ratio of the ad
231231// /
232- - (void )didReceiveAd:(TFACustomAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
232+ - (void )didReceiveAd:(TFAAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
233233// / Called when you did not get and ad
234234// / \param ad The teadsAd object
235235// /
236236// / \param adFailReason AdFailReason object that contains an error code and an error message
237237// /
238- - (void )didFailToReceiveAd:(TFACustomAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
238+ - (void )didFailToReceiveAd:(TFAAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
239239// / Called when the ad should be closed
240240// / \param ad The teadsAd object
241241// /
242242// / \param userAction is the close an action from the user or an automatic one
243243// /
244- - (void )adClose:(TFACustomAdView * _Nonnull)ad userAction:(BOOL )userAction;
244+ - (void )adClose:(TFAAdView * _Nonnull)ad userAction:(BOOL )userAction;
245245// / Called when the teads SDK encounter an error
246- // / \param ad The TFACustomAdView
246+ // / \param ad The teadsAd object
247247// /
248248// / \param errorMessage error message related to the error
249249// /
250- - (void )adError:(TFACustomAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
250+ - (void )adError:(TFAAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
251251@optional
252252// / Called when the modal browser is open
253253// / \param ad The teadsAd object
254254// /
255- - (void )adBrowserDidOpen:(TFACustomAdView * _Nonnull)ad;
255+ - (void )adBrowserDidOpen:(TFAAdView * _Nonnull)ad;
256256// / Called when the modal browser is closed
257257// / \param ad The teadsAd object
258258// /
259- - (void )adBrowserDidClose:(TFACustomAdView * _Nonnull)ad;
259+ - (void )adBrowserDidClose:(TFAAdView * _Nonnull)ad;
260260// / Called when ad is shown in fullscreen
261261// / \param ad The teadsAd object
262262// /
263- - (void )adDidOpenFullscreen:(TFACustomAdView * _Nonnull)ad;
263+ - (void )adDidOpenFullscreen:(TFAAdView * _Nonnull)ad;
264264// / Called when ad leaves the fullscreen mode
265265// / \param ad The teadsAd object
266266// /
267- - (void )adDidCloseFullscreen:(TFACustomAdView * _Nonnull)ad;
267+ - (void )adDidCloseFullscreen:(TFAAdView * _Nonnull)ad;
268268// / Called when ad start
269269// / \param ad The teadsAd object
270270// /
271- - (void )adPlaybackChange:(TFACustomAdView * _Nonnull)ad state:(enum TeadsAdPlaybackState)state;
271+ - (void )adPlaybackChange:(TFAAdView * _Nonnull)ad state:(enum TeadsAdPlaybackState)state;
272272// / Called when ad changes volume state
273273// / @deprecated since 4.1.x please use TFASoundDelegate instead
274274// / \param ad The teadsAd object
275275// /
276276// / \param muted true if the sound is off false otherwise
277277// /
278- - (void )adDidChangeVolume:(TFACustomAdView * _Nonnull)ad muted:(BOOL )muted;
278+ - (void )adDidChangeVolume:(TFAAdView * _Nonnull)ad muted:(BOOL )muted;
279279@end
280280
281281@protocol TFASoundDelegate;
282282@class NSCoder ;
283283@class TeadsAdSettings;
284284
285- SWIFT_CLASS (" _TtC8TeadsSDK15TFACustomAdView " )
286- @interface TFACustomAdView : UIView
285+ SWIFT_CLASS (" _TtC8TeadsSDK9TFAAdView " )
286+ @interface TFAAdView : UIView
287287// / Ad loading state
288288@property (nonatomic, readonly) BOOL isLoading;
289289// / Ad loaded state
@@ -300,35 +300,24 @@ SWIFT_CLASS("_TtC8TeadsSDK15TFACustomAdView")
300300- (void )awakeFromNib;
301301- (void )willMoveToSuperview:(UIView * _Nullable)newSuperview;
302302- (void )didMoveToSuperview;
303- - (nonnull instancetype )initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
304- // / Init TFACustomAdView by prodiving the pId and optional parameters
305- // / \param pid The Placement ID
306- // /
307- // / \param delegate The TeadsAdDelegate object
308- // /
309- // /
310- // / returns:
311- // / TeadsAd instance
312- - (nonnull instancetype )initWithPid:(NSInteger )pid andDelegate:(id <TFAAdDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER;
303+ - (nonnull instancetype )initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
313304- (nonnull instancetype )initWithPid:(NSString * _Nonnull)pid delegate:(id <TFAAdDelegate> _Nullable)delegate SWIFT_DEPRECATED_MSG (" use init(withPid: andDelegate:)" );
314305- (nullable instancetype )initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
315306// / Request an ad from Teads ad server
316307// / \param teadsAdSettings Optionnal <code>TeadsAdSettings</code> to define custom settings
317308// /
318309- (void )loadWithTeadsAdSettings:(TeadsAdSettings * _Nullable)teadsAdSettings;
319- // / Enables debug for TFACustomAdView instance
310+ // / Enables debug for TFAAdView instance
320311// / Will provide logs about what is going on
321312- (void )enableDebug;
313+ // / Set the ad container, allow you to monitor your inventory
314+ // / \param container the container which will contain the adView
315+ // /
316+ - (void )setAdContainerViewWithContainer:(UIView * _Nonnull)container;
322317// / Reset ad loading
323318- (void )reset;
324- // / Request ad to pause
325- - (void )requestPause SWIFT_DEPRECATED_MSG (" It is not supported anymore" );
326- // / Request ad to resume
327- - (void )requestStart SWIFT_DEPRECATED_MSG (" It is not supported anymore" );
328- // / Request ad to resume
329- - (void )requestResume SWIFT_DEPRECATED_MSG (" It is not supported anymore" );
330- // / Call that method when you did not add the TFACustomAdView to your to your view hierarchy or if Teads view has width/height of 0 and the container view reached the spot where the ad was supposed to be
331- - (void )slotReached;
319+ // / Call that method when you did not add the TFAAdView to your to your view hierarchy or if Teads view has width/height of 0 and the container view reached the spot where the ad was supposed to be
320+ - (void )slotReached SWIFT_DEPRECATED_MSG (" Use setAdContainerView instead" );
332321@end
333322
334323typedef SWIFT_ENUM (NSInteger , TeadsAdPlaybackState, closed) {
@@ -337,6 +326,37 @@ typedef SWIFT_ENUM(NSInteger, TeadsAdPlaybackState, closed) {
337326 TeadsAdPlaybackStatePlaybackStatePaused = 2 ,
338327};
339328
329+
330+ SWIFT_CLASS (" _TtC8TeadsSDK15TFACustomAdView" )
331+ @interface TFACustomAdView : TFAAdView
332+ - (nonnull instancetype )initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
333+ // / Init TFACustomAdView by prodiving the pId and optional parameters
334+ // / \param pid The Placement ID
335+ // /
336+ // / \param delegate The TeadsAdDelegate object
337+ // /
338+ // /
339+ // / returns:
340+ // / TeadsAd instance
341+ - (nonnull instancetype )initWithPid:(NSInteger )pid andDelegate:(id <TFAAdDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER;
342+ - (nullable instancetype )initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
343+ @end
344+
345+
346+ SWIFT_CLASS (" _TtC8TeadsSDK15TFAInReadAdView" )
347+ @interface TFAInReadAdView : TFAAdView
348+ // / Init TFACustomAdView by prodiving the pId and optional parameters
349+ // / \param pid The Placement ID
350+ // /
351+ // / \param delegate The TeadsAdDelegate object
352+ // /
353+ // /
354+ // / returns:
355+ // / TeadsAd instance
356+ - (nonnull instancetype )initWithPid:(NSInteger )pid andDelegate:(id <TFAAdDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER;
357+ - (nullable instancetype )initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
358+ @end
359+
340360@protocol TFAInterstitialAdDelegate;
341361
342362SWIFT_CLASS (" _TtC8TeadsSDK17TFAInterstitialAd" )
@@ -349,12 +369,12 @@ SWIFT_CLASS("_TtC8TeadsSDK17TFAInterstitialAd")
349369- (nonnull instancetype )initWithPid:(NSString * _Nonnull)pid delegate:(id <TFAInterstitialAdDelegate> _Nullable)delegate SWIFT_DEPRECATED_MSG (" use init(withPid: andDelegate:)" );
350370- (void )loadWithSettings:(TeadsAdSettings * _Nullable)settings;
351371- (void )show;
352- - (void )didReceiveAd:(TFACustomAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
353- - (void )didFailToReceiveAd:(TFACustomAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
354- - (void )adClose:(TFACustomAdView * _Nonnull)ad userAction:(BOOL )userAction;
355- - (void )adError:(TFACustomAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
356- - (void )adBrowserDidOpen:(TFACustomAdView * _Nonnull)ad;
357- - (void )adBrowserDidClose:(TFACustomAdView * _Nonnull)ad;
372+ - (void )didReceiveAd:(TFAAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
373+ - (void )didFailToReceiveAd:(TFAAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
374+ - (void )adClose:(TFAAdView * _Nonnull)ad userAction:(BOOL )userAction;
375+ - (void )adError:(TFAAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
376+ - (void )adBrowserDidOpen:(TFAAdView * _Nonnull)ad;
377+ - (void )adBrowserDidClose:(TFAAdView * _Nonnull)ad;
358378- (nonnull instancetype )init SWIFT_UNAVAILABLE;
359379+ (nonnull instancetype )new SWIFT_DEPRECATED_MSG(" -init is unavailable" );
360380@end
@@ -395,13 +415,13 @@ SWIFT_CLASS("_TtC8TeadsSDK13TFARewardedAd")
395415- (nonnull instancetype )initWithPid:(NSString * _Nonnull)pid delegate:(id <TFARewardedAdDelegate> _Nullable)delegate SWIFT_DEPRECATED_MSG (" use init(withPid: andDelegate:)" );
396416- (void )loadWithSettings:(TeadsAdSettings * _Nullable)settings;
397417- (void )show;
398- - (void )didReceiveAd:(TFACustomAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
399- - (void )didFailToReceiveAd:(TFACustomAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
400- - (void )adClose:(TFACustomAdView * _Nonnull)ad userAction:(BOOL )userAction;
401- - (void )adError:(TFACustomAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
402- - (void )adPlaybackChange:(TFACustomAdView * _Nonnull)ad state:(enum TeadsAdPlaybackState)state;
403- - (void )adBrowserDidOpen:(TFACustomAdView * _Nonnull)ad;
404- - (void )adBrowserDidClose:(TFACustomAdView * _Nonnull)ad;
418+ - (void )didReceiveAd:(TFAAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
419+ - (void )didFailToReceiveAd:(TFAAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
420+ - (void )adClose:(TFAAdView * _Nonnull)ad userAction:(BOOL )userAction;
421+ - (void )adError:(TFAAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
422+ - (void )adPlaybackChange:(TFAAdView * _Nonnull)ad state:(enum TeadsAdPlaybackState)state;
423+ - (void )adBrowserDidOpen:(TFAAdView * _Nonnull)ad;
424+ - (void )adBrowserDidClose:(TFAAdView * _Nonnull)ad;
405425- (nonnull instancetype )init SWIFT_UNAVAILABLE;
406426+ (nonnull instancetype )new SWIFT_DEPRECATED_MSG(" -init is unavailable" );
407427@end
@@ -426,9 +446,9 @@ SWIFT_PROTOCOL("_TtP8TeadsSDK21TFARewardedAdDelegate_")
426446SWIFT_PROTOCOL (" _TtP8TeadsSDK16TFASoundDelegate_" )
427447@protocol TFASoundDelegate
428448// / Called when the ad will start playing audio
429- - (void )adWillStartPlayingAudio:(TFACustomAdView * _Nonnull)ad;
449+ - (void )adWillStartPlayingAudio:(TFAAdView * _Nonnull)ad;
430450// / Called when the ad will stop playing audio
431- - (void )adDidStopPlayingAudio:(TFACustomAdView * _Nonnull)ad;
451+ - (void )adDidStopPlayingAudio:(TFAAdView * _Nonnull)ad;
432452@end
433453
434454
0 commit comments