Skip to content

Commit

Permalink
Split project into simple and complete examples
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzhuie committed Feb 26, 2016
1 parent 3fde4bd commit 3fa9a21
Show file tree
Hide file tree
Showing 90 changed files with 1,018 additions and 4 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
1F2178AE1C0FC7CF0094CE2C /* SpaceAdsSpash.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F2178AD1C0FC7CF0094CE2C /* SpaceAdsSpash.png */; };
1F27BC991C0CDE9000C0CBC7 /* battery25.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F27BC8B1C0CDE9000C0CBC7 /* battery25.png */; };
1F27BC9A1C0CDE9000C0CBC7 /* battery50.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F27BC8C1C0CDE9000C0CBC7 /* battery50.png */; };
1F27BC9B1C0CDE9000C0CBC7 /* battery75.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F27BC8D1C0CDE9000C0CBC7 /* battery75.png */; };
Expand All @@ -32,6 +31,7 @@
1F6D31231BFAB9F4002702D5 /* SpriteKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F6D31221BFAB9F4002702D5 /* SpriteKit.framework */; };
1F6D31251BFABA1F002702D5 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F6D31241BFABA1F002702D5 /* SystemConfiguration.framework */; };
1F9794721C4EF19600D594A5 /* arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F9794711C4EF19600D594A5 /* arrow.png */; };
1FA646C31C80E1930043C3BB /* SpaceAdsSpash.png in Resources */ = {isa = PBXBuildFile; fileRef = 1FA646C21C80E1930043C3BB /* SpaceAdsSpash.png */; };
1FBFD7A41C0D21A70037DBB6 /* UnityAds.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1FBFD7A21C0D21A70037DBB6 /* UnityAds.bundle */; };
1FBFD7A51C0D21A70037DBB6 /* UnityAds.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FBFD7A31C0D21A70037DBB6 /* UnityAds.framework */; };
1FE2BDD01BE7E4DF0063D636 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FE2BDCF1BE7E4DF0063D636 /* AppDelegate.swift */; };
Expand All @@ -43,7 +43,6 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1F2178AD1C0FC7CF0094CE2C /* SpaceAdsSpash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SpaceAdsSpash.png; sourceTree = "<group>"; };
1F27BC8B1C0CDE9000C0CBC7 /* battery25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = battery25.png; path = Recources/battery25.png; sourceTree = "<group>"; };
1F27BC8C1C0CDE9000C0CBC7 /* battery50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = battery50.png; path = Recources/battery50.png; sourceTree = "<group>"; };
1F27BC8D1C0CDE9000C0CBC7 /* battery75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = battery75.png; path = Recources/battery75.png; sourceTree = "<group>"; };
Expand All @@ -70,6 +69,7 @@
1F6D31221BFAB9F4002702D5 /* SpriteKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SpriteKit.framework; path = System/Library/Frameworks/SpriteKit.framework; sourceTree = SDKROOT; };
1F6D31241BFABA1F002702D5 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
1F9794711C4EF19600D594A5 /* arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrow.png; path = Recources/arrow.png; sourceTree = "<group>"; };
1FA646C21C80E1930043C3BB /* SpaceAdsSpash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = SpaceAdsSpash.png; path = Recources/SpaceAdsSpash.png; sourceTree = "<group>"; };
1FBFD7A21C0D21A70037DBB6 /* UnityAds.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = UnityAds.bundle; sourceTree = "<group>"; };
1FBFD7A31C0D21A70037DBB6 /* UnityAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UnityAds.framework; sourceTree = "<group>"; };
1FE2BDCC1BE7E4DF0063D636 /* SpaceAdsSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpaceAdsSwift.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -118,8 +118,8 @@
1F27BC951C0CDE9000C0CBC7 /* playadbutton.png */,
1F27BC961C0CDE9000C0CBC7 /* rewardedbutton.png */,
1F27BC971C0CDE9000C0CBC7 /* stars.jpg */,
1FA646C21C80E1930043C3BB /* SpaceAdsSpash.png */,
1F27BC981C0CDE9000C0CBC7 /* tricurser.png */,
1F2178AD1C0FC7CF0094CE2C /* SpaceAdsSpash.png */,
1F9794711C4EF19600D594A5 /* arrow.png */,
);
name = Resources;
Expand Down Expand Up @@ -238,6 +238,7 @@
1FBFD7A41C0D21A70037DBB6 /* UnityAds.bundle in Resources */,
1F27BC9F1C0CDE9000C0CBC7 /* gatherbutton.png in Resources */,
1F27BC9D1C0CDE9000C0CBC7 /* console.png in Resources */,
1FA646C31C80E1930043C3BB /* SpaceAdsSpash.png in Resources */,
1F9794721C4EF19600D594A5 /* arrow.png in Resources */,
1FE2BDDE1BE7E4DF0063D636 /* LaunchScreen.storyboard in Resources */,
1F27BCA31C0CDE9000C0CBC7 /* playadbutton.png in Resources */,
Expand All @@ -254,7 +255,6 @@
1F27BCA21C0CDE9000C0CBC7 /* planetb.png in Resources */,
1FE2BDD91BE7E4DF0063D636 /* Main.storyboard in Resources */,
1F27BCA41C0CDE9000C0CBC7 /* rewardedbutton.png in Resources */,
1F2178AE1C0FC7CF0094CE2C /* SpaceAdsSpash.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
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.
Binary file added Shared Recources/SpaceAdsSpash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Shared Recources/UnityAds.bundle/Info.plist
Binary file not shown.
Binary file added Shared Recources/UnityAds.bundle/audio_mute.png
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.
Binary file added Shared Recources/UnityAds.bundle/audio_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Shared Recources/UnityAds.bundle/audio_on@2x.png
Binary file not shown.
82 changes: 82 additions & 0 deletions Shared Recources/UnityAds.framework/Headers/UnityAds.h
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 not shown.
Binary file added Shared Recources/UnityAds.framework/UnityAds
Binary file not shown.
Binary file added Shared Recources/arrow.png
Binary file added Shared Recources/battery100.png
Binary file added Shared Recources/battery25.png
Binary file added Shared Recources/battery50.png
Binary file added Shared Recources/battery75.png
Binary file added Shared Recources/console.png
Binary file added Shared Recources/frost.png
Binary file added Shared Recources/gatherbutton.png
Binary file added Shared Recources/landscape.png
Binary file added Shared Recources/locatefuelbutton.png
Binary file added Shared Recources/planetb.png
Binary file added Shared Recources/playadbutton.png
Binary file added Shared Recources/rewardedbutton.png
Binary file added Shared Recources/stars.jpg
Binary file added Shared Recources/tricurser.png
Binary file added Simple Example/Recources/SpaceAdsSpash.png
Binary file added Simple Example/Recources/console.png
Binary file added Simple Example/Recources/planetb.png
Binary file added Simple Example/Recources/playadbutton.png
Binary file added Simple Example/Recources/stars.jpg
Loading

0 comments on commit 3fa9a21

Please sign in to comment.