-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split project into simple and complete examples
- Loading branch information
Showing
90 changed files
with
1,018 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Binary file not shown.
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,82 @@ | ||
// | ||
// UnityAds.h | ||
// Copyright (c) 2012 Unity Technologies. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <StoreKit/StoreKit.h> | ||
|
||
#define UALOG_LOG(levelName, fmt, ...) if ([[UnityAds sharedInstance] isDebugMode]) NSLog((@"%@ [T:0x%x %@] %s:%d " fmt), levelName, (unsigned int)[NSThread currentThread], ([[NSThread currentThread] isMainThread] ? @"M" : @"S"), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) | ||
|
||
#define UALOG_ERROR(fmt, ...) UALOG_LOG(@"ERROR", fmt, ##__VA_ARGS__) | ||
|
||
#define UALOG_DEBUG(fmt, ...) UALOG_LOG(@"DEBUG", fmt, ##__VA_ARGS__) | ||
#define UAAssert(condition) do { if ([[UnityAds sharedInstance] isDebugMode] && !(condition)) { UALOG_ERROR(@"Expected condition '%s' to be true.", #condition); abort(); } } while(0) | ||
#define UAAssertV(condition, value) do { if ([[UnityAds sharedInstance] isDebugMode] && !(condition)) { UALOG_ERROR(@"Expected condition '%s' to be true.", #condition); abort(); } } while(0) | ||
|
||
extern NSString * const kUnityAdsRewardItemPictureKey; | ||
extern NSString * const kUnityAdsRewardItemNameKey; | ||
|
||
extern NSString * const kUnityAdsOptionNoOfferscreenKey; | ||
extern NSString * const kUnityAdsOptionOpenAnimatedKey; | ||
extern NSString * const kUnityAdsOptionGamerSIDKey; | ||
extern NSString * const kUnityAdsOptionMuteVideoSounds; | ||
extern NSString * const kUnityAdsOptionVideoUsesDeviceOrientation; | ||
|
||
@class UnityAds; | ||
@class SKStoreProductViewController; | ||
|
||
@protocol UnityAdsDelegate <NSObject> | ||
|
||
@required | ||
- (void)unityAdsVideoCompleted:(NSString *)rewardItemKey skipped:(BOOL)skipped; | ||
|
||
@optional | ||
- (void)unityAdsWillShow; | ||
- (void)unityAdsDidShow; | ||
- (void)unityAdsWillHide; | ||
- (void)unityAdsDidHide; | ||
- (void)unityAdsWillLeaveApplication; | ||
- (void)unityAdsVideoStarted; | ||
- (void)unityAdsFetchCompleted; | ||
- (void)unityAdsFetchFailed; | ||
@end | ||
|
||
@interface UnityAds : NSObject | ||
|
||
@property (nonatomic, weak) id<UnityAdsDelegate> delegate; | ||
|
||
+ (UnityAds *)sharedInstance; | ||
+ (BOOL)isSupported; | ||
+ (NSString *)getSDKVersion; | ||
|
||
- (void)setTestDeveloperId:(NSString *)developerId; | ||
- (void)setTestOptionsId:(NSString *)optionsId; | ||
- (void)setDebugMode:(BOOL)debugMode; | ||
- (void)setTestMode:(BOOL)testModeEnabled; | ||
- (void)enableUnityDeveloperInternalTestMode; | ||
- (void)setCampaignDataURL:(NSString *)campaignDataUrl; | ||
- (void)setUnityVersion:(NSString *)unityVersion; | ||
|
||
- (BOOL)isDebugMode; | ||
- (BOOL)startWithGameId:(NSString *)gameId andViewController:(UIViewController *)viewController; | ||
- (BOOL)startWithGameId:(NSString *)gameId; | ||
- (BOOL)setViewController:(UIViewController *)viewController; | ||
- (BOOL)canShowAds; | ||
- (BOOL)canShow; | ||
- (BOOL)canShowZone:(NSString *)zoneId; | ||
- (BOOL)setZone:(NSString *)zoneId; | ||
- (BOOL)setZone:(NSString *)zoneId withRewardItem:(NSString *)rewardItemKey; | ||
- (NSString *)getZone; | ||
- (BOOL)show:(NSDictionary *)options; | ||
- (BOOL)show; | ||
- (BOOL)hide; | ||
- (void)stopAll; | ||
- (BOOL)hasMultipleRewardItems; | ||
- (NSArray *)getRewardItemKeys; | ||
- (NSString *)getDefaultRewardItemKey; | ||
- (NSString *)getCurrentRewardItemKey; | ||
- (BOOL)setRewardItemKey:(NSString *)rewardItemKey; | ||
- (void)setDefaultRewardItemAsRewardItem; | ||
- (NSDictionary *)getRewardItemDetailsWithKey:(NSString *)rewardItemKey; | ||
@end |
Binary file not shown.
Binary file added
BIN
+42 Bytes
Shared Recources/UnityAds.framework/Resources/en.lproj/InfoPlist.strings
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.