Skip to content

Commit

Permalink
Update to 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrules44 committed Dec 2, 2024
1 parent 67ad57e commit af00e0f
Show file tree
Hide file tree
Showing 148 changed files with 4,060 additions and 1,307 deletions.
2 changes: 1 addition & 1 deletion plugins/2018.3326/android/corona.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
implementation 'com.appodeal.ads.sdk.networks:ironsource:3.3.1.0'
implementation 'com.appodeal.ads.sdk.networks:ironsource:3.4.0.0'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// ISAAdFormat.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
Enum representing available ad formats.
*/
typedef NS_ENUM(NSUInteger, ISAAdFormatType) {
ISAAdFormatTypeInterstitial,
ISAAdFormatTypeRewarded,
ISAAdFormatTypeBanner
};

/**
Class representing an ad format.
*/
@interface ISAAdFormat : NSObject

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

/**
The ad format type.
*/
@property(readonly, nonatomic) ISAAdFormatType adFormatType;

/**
Initializes with the given ad format type.
@param adFormatType the ad format type to represent.
*/
- (instancetype)initWithAdFormatType:(ISAAdFormatType)adFormatType;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// ISAAdSize.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
Class representing an ad size.
*/
@interface ISAAdSize : NSObject

@property(nonatomic, readonly) CGFloat width;
@property(nonatomic, readonly) CGFloat height;
@property(nonatomic, readonly, copy) NSString *sizeDescription;

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

/**
Creates an `ISAAdSize` for a banner ad.
*/
+ (ISAAdSize *)banner;

/**
Creates an `ISAAdSize` for a large ad.
*/
+ (ISAAdSize *)large;

/**
Creates an `ISAAdSize` for a medium rectangle ad.
*/
+ (ISAAdSize *)mediumRectangle;

/**
Creates an `ISAAdSize` for a leaderboard ad.
*/
+ (ISAAdSize *)leaderboard;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// ISABannerAdInfo.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
Class containing information on the associated banner ad.
*/
@interface ISABannerAdInfo : NSObject

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

/**
The identifier of the network instance.
*/
@property(nonatomic, strong, readonly) NSString *instanceId;

/**
The unique identifier of the ad.
*/
@property(nonatomic, strong, readonly) NSString *adId;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// ISNBannerLoader.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import "ISABannerAdLoaderDelegate.h"
#import "ISABannerAdRequest.h"

NS_ASSUME_NONNULL_BEGIN

/**
Class responsible for loading banner ads.
*/
@interface ISABannerAdLoader : NSObject

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

/**
Loads a banner ad.
The delegate will send a `bannerAdDidLoad:` or
`bannerAdDidFailToLoadWithError:` callback.
@param adRequest The request configuration for the ad to be loaded.
@param delegate The delegate to be notified of ad loading callbacks. The callbacks will be invoked
on the main thread. The delegate is held weakly.
*/
+ (void)loadAdWithAdRequest:(ISABannerAdRequest *)adRequest
delegate:(id<ISABannerAdLoaderDelegate>)delegate;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// ISABannerAdLoaderDelegate.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import "ISABannerAdView.h"

NS_ASSUME_NONNULL_BEGIN

/**
Protocol handling loading callbacks for a requested banner ad.
The callbacks will be invoked on the main thread.
*/
@protocol ISABannerAdLoaderDelegate <NSObject>

/**
Called when a banner ad is successfully loaded.
@param bannerAdView The banner ad that is loaded.
*/
- (void)bannerAdDidLoad:(ISABannerAdView *)bannerAdView;

/**
Called when a banner ad fails to load.
@param error The error that occurred during loading.
*/
- (void)bannerAdDidFailToLoadWithError:(NSError *)error;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// ISNBannerAdRequest.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ISAAdSize.h"

NS_ASSUME_NONNULL_BEGIN

/**
Class representing a loading request for a banner ad.
Use `ISABannerAdRequestBuilder` in order to create an instance of this class.
*/
@interface ISABannerAdRequest : NSObject

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

/**
The identifier for the network instance.
*/
@property(nonatomic, strong, readonly) NSString *instanceId;

/**
The ad markup.
*/
@property(nonatomic, strong, readonly) NSString *adm;

/**
The ad size.
*/
@property(nonatomic, strong, readonly) ISAAdSize *size;

/**
The view controller to show the ad on, if available.
*/
@property(nonatomic, weak, readonly, nullable) UIViewController *viewController;

/**
Extra parameters for the ad request.
*/
@property(nonatomic, strong, readonly, nullable) NSDictionary *extraParams;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// ISABannerAdRequestBuilder.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ISAAdSize.h"
#import "ISABannerAdRequest.h"

NS_ASSUME_NONNULL_BEGIN

/**
Builder class for `ISABannerAdRequest`.
*/
@interface ISABannerAdRequestBuilder : NSObject

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

/**
Initializes the builder.
@param instanceId The identifier for the network instance.
@param adm The ad markup.
@param size The ad size.
*/
- (instancetype)initWithInstanceId:(NSString *)instanceId
adm:(NSString *)adm
size:(ISAAdSize *)size;

/**
Sets extra parameters for the ad request.
Optional.
@param extraParams The extra parameters dictionary.
@return The Builder instance.
*/
- (ISABannerAdRequestBuilder *)withExtraParams:(NSDictionary *)extraParams;

/**
Sets the view controller that will show the ad, if available.
@param viewController The view controller that will show the ad, if available.
@return The Builder instance.
*/
- (ISABannerAdRequestBuilder *)withViewController:(UIViewController *)viewController;

/**
Builds the `ISABannerAdRequest` instance.
@return The ad request instance.
*/
- (ISABannerAdRequest *)build;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// ISNBannerAdView.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ISABannerAdInfo.h"
#import "ISABannerAdViewDelegate.h"

NS_ASSUME_NONNULL_BEGIN

@interface ISABannerAdView : UIView

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

@property(nonatomic, weak, nullable) id<ISABannerAdViewDelegate> delegate;
@property(nonatomic, strong, readonly) ISABannerAdInfo* adInfo;
@property(nonatomic, weak, nullable) UIViewController* viewController;

NS_ASSUME_NONNULL_END

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// ISABannerAdViewDelegate.h
// IronSource
//
// Copyright © 2024 IronSource. All rights reserved.
//

NS_ASSUME_NONNULL_BEGIN

@class ISABannerAdView;

/**
Protocol handling banner ad show events for `ISABannerAd`.
The callbacks will be invoked on the main thread.
*/
@protocol ISABannerAdViewDelegate <NSObject>

/**
Called when a banner ad is shown.
@param bannerAdView The banner ad that is shown.
*/
- (void)bannerAdViewDidShow:(ISABannerAdView *)bannerAdView;

/**
Called when a banner ad is clicked.
@param bannerAdView The banner ad that is clicked.
*/
- (void)bannerAdViewDidClick:(ISABannerAdView *)bannerAdView;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit af00e0f

Please sign in to comment.