-
Notifications
You must be signed in to change notification settings - Fork 0
/
STAStaticStartAppAd.m
57 lines (47 loc) · 950 Bytes
/
STAStaticStartAppAd.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// STAStaticStartAppAd.m
// CatchPhrase
//
// Created by Logan Sease on 1/20/15.
//
//
#import "STAStaticStartAppAd.h"
@implementation STAStaticStartAppAd
static STAStaticStartAppAd *commonAd = nil;
#pragma mark Singleton Methods
+ (id)commonAd {
@synchronized(self) {
if (commonAd == nil){
commonAd = [[self alloc] init];
}
}
return commonAd;
}
-(id)init
{
if(self = [super init])
{
[self loadAdWithDelegate:self];
}
return self;
}
+(void)setupWithAppId:(NSString*)appId andDevId:(NSString*)devId
{
STAStartAppSDK* sdk = [STAStartAppSDK sharedInstance];
sdk.appID = appId;
sdk.devID = devId;
[self commonAd];
}
+(void)showAd
{
[commonAd showAd];
}
- (void) didCloseAd:(STAAbstractAd*)ad
{
commonAd = [[STAStaticStartAppAd alloc] init];
}
- (void) didClickAd:(STAAbstractAd*)ad
{
commonAd = [[STAStaticStartAppAd alloc] init];
}
@end