-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from AGulev/unity-sdk-3
UnityADS SDK 3.1
- Loading branch information
Showing
51 changed files
with
2,102 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
defunityads/lib/ios/UnityAds.framework/Headers/NSString+UnityAdsError.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import "UnityAds.h" | ||
|
||
@interface NSString (UnityAdsError) | ||
- (UnityAdsError)unityAdsErrorFromString; | ||
@end |
107 changes: 107 additions & 0 deletions
107
defunityads/lib/ios/UnityAds.framework/Headers/UADSBanner.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#include <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
* UnityAdsBannerDelegate is a delegate class for callbacks from Unity Ads Banner operations. | ||
*/ | ||
@protocol UnityAdsBannerDelegate <NSObject> | ||
|
||
/** | ||
Called when the banner is loaded and ready to be placed in the view hierarchy. | ||
@param placementId The ID of the placement of the banner that is loaded. | ||
@param view View that is to be placed in the view hierarchy. | ||
*/ | ||
-(void)unityAdsBannerDidLoad:(NSString *)placementId view:(UIView *)view; | ||
|
||
/** | ||
Called when the banner is unloaded and references to it should be discarded. | ||
The view provided in unityAdsBannerDidLoad will be removed from the view hierarchy before | ||
this method is called. | ||
*/ | ||
-(void)unityAdsBannerDidUnload:(NSString *)placementId; | ||
|
||
/** | ||
* Called when the banner is shown. | ||
* | ||
* @param placementId The ID of the placement that has shown. | ||
*/ | ||
-(void)unityAdsBannerDidShow:(NSString *)placementId; | ||
|
||
/** | ||
* Called when the banner is hidden. | ||
* | ||
* @param placementId the ID of the that has hidden. | ||
*/ | ||
-(void)unityAdsBannerDidHide:(NSString *)placementId; | ||
|
||
/** | ||
* Called when the user clicks the banner. | ||
* | ||
* @param placementId the ID of the placement that has been clicked. | ||
*/ | ||
-(void)unityAdsBannerDidClick:(NSString *)placementId; | ||
|
||
/** | ||
* Called when `UnityAdsBanner` encounters an error. All errors will be logged but this method can be used as an additional debugging aid. This callback can also be used for collecting statistics from different error scenarios. | ||
* | ||
* @param message A human readable string indicating the type of error encountered. | ||
*/ | ||
-(void)unityAdsBannerDidError:(NSString *)message; | ||
@end | ||
|
||
/** | ||
* An enumeration for the various ways to position the Unity Ads banner placement. | ||
*/ | ||
typedef NS_ENUM(NSInteger, UnityAdsBannerPosition) { | ||
kUnityAdsBannerPositionTopLeft, | ||
kUnityAdsBannerPositionTopCenter, | ||
kUnityAdsBannerPositionTopRight, | ||
kUnityAdsBannerPositionBottomLeft, | ||
kUnityAdsBannerPositionBottomCenter, | ||
kUnityAdsBannerPositionBottomRight, | ||
kUnityAdsBannerPositionCenter, | ||
kUnityAdsBannerPositionNone | ||
}; | ||
|
||
/** | ||
* UnityAdsBanner is a static class for handling showing and hiding the Unity Ads banner. | ||
*/ | ||
|
||
@interface UnityAdsBanner : NSObject | ||
|
||
/** | ||
* Loads the banner with the default banner placement. | ||
*/ | ||
+(void)loadBanner; | ||
|
||
/** | ||
* Loads the banner with the given placement. | ||
* @param placementId The placement ID, as defined in the Unity Ads admin tools. | ||
*/ | ||
+(void)loadBanner:(NSString *)placementId; | ||
|
||
+(void)setBannerPosition:(UnityAdsBannerPosition)bannerPosition; | ||
|
||
/** | ||
* Destroys the banner. | ||
*/ | ||
+(void)destroy; | ||
|
||
/** | ||
* Provides the currently assigned `UnityAdsBannerDelegate`. | ||
* | ||
* @return The current `UnityAdsBannerDelegate`. | ||
*/ | ||
+(nullable id <UnityAdsBannerDelegate>)getDelegate; | ||
|
||
/** | ||
* Asigns the banner delegate. | ||
* | ||
* @param delegate The new `UnityAdsBannerDelegate' for UnityAds to send banner callbacks to. | ||
*/ | ||
+(void)setDelegate:(id <UnityAdsBannerDelegate>)delegate; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
4 changes: 2 additions & 2 deletions
4
defunityads/lib/ios/UnityAds.framework/Headers/UADSMetaData.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
defunityads/lib/ios/UnityAds.framework/Headers/UANAApiAnalytics.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
// C# | ||
@protocol UANAEngineDelegate <NSObject> | ||
-(void)addExtras:(NSString *)extras; | ||
@end | ||
|
||
// Webview | ||
@interface UANAApiAnalytics : NSObject | ||
+(void)setAnalyticsDelegate:(id <UANAEngineDelegate>)analyticsDelegate; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
17 changes: 17 additions & 0 deletions
17
defunityads/lib/ios/UnityAds.framework/Headers/UMONCustomEvent.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface UMONCustomEventBuilder : NSObject | ||
@property (nonatomic) NSString* category; | ||
@property (nonatomic) NSString* type; | ||
@property (nonatomic) NSDictionary* userInfo; | ||
@end | ||
|
||
@interface UMONCustomEvent : NSObject | ||
@property (strong) NSString* category; | ||
@property (strong) NSString* type; | ||
@property (strong) NSDictionary* userInfo; | ||
-(instancetype)initWithBuilder:(UMONCustomEventBuilder*)builder; | ||
+(instancetype)build:(void (^)(UMONCustomEventBuilder *))buildBlock; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@interface UMONItemBuilder : NSObject | ||
@property(strong, nonatomic) NSString *productId; | ||
@property(nonatomic) double quantity; | ||
@property(strong, nonatomic) NSString *type; | ||
@end | ||
|
||
@interface UMONItem : NSObject | ||
+(instancetype)build:(void (^)(UMONItemBuilder *))buildBlock; | ||
|
||
-(instancetype)initWithBuilder:(UMONItemBuilder *)builder; | ||
|
||
@property(nonatomic, strong, readonly) NSString *productId; | ||
@property(nonatomic, readonly) double quantity; | ||
@property(nonatomic, strong, readonly) NSString *type; | ||
@end |
Oops, something went wrong.