Skip to content

Commit 8843a34

Browse files
author
Unity Ads Travis
committed
Release 2.0.7
1 parent ea20f50 commit 8843a34

File tree

7 files changed

+38
-16
lines changed

7 files changed

+38
-16
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
release:
2+
./build-framework.sh -c RELEASE
3+
4+
zip: release
5+
cd build/Release-iphoneos && zip -9r builds.zip UnityAds.framework
6+
mv build/Release-iphoneos/builds.zip .

Modules/module.modulemap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
framework module UnityAds {
22
umbrella header "UnityAds.h"
3+
header "UnityAdsExtended.h"
34

45
export *
56
module * { export * }

UnityAds/Api/UADSApiAdUnit.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ + (void)WebViewExposed_setTransform:(NSNumber *)transform callback:(UADSWebViewC
140140
if ([UADSApiAdUnit getAdUnit]) {
141141
dispatch_async(dispatch_get_main_queue(), ^(void) {
142142
[[UADSApiAdUnit getAdUnit] setTransform:[transform floatValue]];
143-
[callback invoke:transform, nil];
144143
});
144+
[callback invoke:transform, nil];
145145
}
146146
else {
147147
[callback error:NSStringFromAdUnitError(kUnityAdsViewControllerNull) arg1:nil];

UnityAds/MetaData/UADSMetaData.m

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,25 @@ - (void)commit {
3333
if ([UADSStorageManager init]) {
3434
UADSStorage *storage = [UADSStorageManager getStorage:kUnityAdsStorageTypePublic];
3535

36-
for (NSString *key in [self.entries allKeys]) {
36+
if (self.entries) {
37+
for (NSString *key in [self.entries allKeys]) {
38+
if (storage) {
39+
[storage setValue:[self.entries objectForKey:key] forKey:key];
40+
}
41+
}
42+
3743
if (storage) {
38-
[storage setValue:[self.entries objectForKey:key] forKey:key];
44+
[storage writeStorage];
45+
[storage sendEvent:@"SET" values:self.entries];
46+
}
47+
else {
48+
UADSLogDebug(@"No storage found!");
3949
}
40-
}
41-
42-
if (storage) {
43-
[storage writeStorage];
44-
[storage sendEvent:@"SET" values:self.entries];
45-
}
46-
else {
47-
UADSLogDebug(@"No storage found!");
4850
}
4951
}
5052
else {
5153
UADSLogError(@"Init storages failed!");
5254
}
5355
}
5456

55-
@end
57+
@end

UnityAds/Properties/UADSSdkProperties.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
NSString * const kUnityAdsCacheDirName = @"UnityAdsCache";
44
NSString * const kUnityAdsLocalCacheFilePrefix = @"UnityAdsCache-";
55
NSString * const kUnityAdsLocalStorageFilePrefix = @"UnityAdsStorage-";
6-
NSString * const kUnityAdsVersionName = @"2.0.6";
6+
NSString * const kUnityAdsVersionName = @"2.0.7";
77
NSString * const kUnityAdsFlavorDebug = @"debug";
88
NSString * const kUnityAdsFlavorRelease = @"release";
9-
int const kUnityAdsVersionCode = 2006;
9+
int const kUnityAdsVersionCode = 2007;
1010

1111
@implementation UADSSdkProperties
1212

UnityAds/WebView/UADSWebViewApp.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ + (void)create:(UADSConfiguration *)configuration; {
2020
dispatch_sync(dispatch_get_main_queue(), ^(void) {
2121
UIWebView *webView = NULL;
2222
webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 1024,768)];
23+
webView.mediaPlaybackRequiresUserAction = NO;
24+
webView.allowsInlineMediaPlayback = YES;
2325
[webView setBackgroundColor:[UIColor clearColor]];
2426
[webView setOpaque:false];
2527
webView.scrollView.bounces = NO;
@@ -195,4 +197,4 @@ - (UADSNativeCallback *)getCallbackWithId:(NSString *)callbackId {
195197
return NULL;
196198
}
197199

198-
@end
200+
@end

UnityAdsTests/MetaDataTests.m

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,15 @@ - (void)testMetadataBaseClassWithCategory {
134134
}
135135
}
136136

137-
@end
137+
- (void)testCommitWithoutMetaDataSet {
138+
MetaDataMockWebViewApp *webApp = [[MetaDataMockWebViewApp alloc] init];
139+
[UADSWebViewApp setCurrentApp:webApp];
140+
UADSMetaData *metadata = [[UADSMetaData alloc] init];
141+
142+
[metadata setCategory:@"test"];
143+
[metadata commit];
144+
145+
XCTAssertNil([metadata entries], "Entries should still be NULL");
146+
}
147+
148+
@end

0 commit comments

Comments
 (0)