Skip to content

Commit e8e94cd

Browse files
runnerrunner
authored andcommitted
Release 4.7.1
1 parent 9d7ccbc commit e8e94cd

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

SourceCode/Private/Core/Properties/USRVSdkProperties.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
NSString *const kUnityServicesLocalStorageFilePrefix = @"UnityAdsStorage-";
1212
NSString *const kUnityServicesWebviewBranchInfoDictionaryKey = @"UADSWebviewBranch";
1313
NSString *const kUnityServicesWebviewConfigInfoDictionaryKey = @"UADSWebviewConfig";
14-
NSString *const kUnityServicesVersionName = @"4.7.0";
14+
NSString *const kUnityServicesVersionName = @"4.7.1";
1515
NSString *const kUnityServicesFlavorDebug = @"debug";
1616
NSString *const kUnityServicesFlavorRelease = @"release";
1717
NSString *const kChinaIsoAlpha2Code = @"CN";
1818
NSString *const kChinaIsoAlpha3Code = @"CHN";
19-
int const kUnityServicesVersionCode = 4700;
19+
int const kUnityServicesVersionCode = 4710;
2020

2121
@implementation USRVSdkProperties
2222

SourceCode/Private/Tools/Categories/NSMutableDictionary/NSMutableDictionary+SafeRemoval.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
@implementation NSMutableDictionary (SafeRemoval)
44
- (id)uads_removeObjectForKeyAndReturn: (NSString *)key {
5+
if (key == nil) {
6+
return nil;
7+
}
8+
59
id object = [self objectForKey: key];
6-
710
[self removeObjectForKey: key];
811
return object;
912
}

SourceCode/Public/Banners/UADSBannerView.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ - (void)setupConstraints {
100100

101101
- (void)dealloc {
102102
self.delegate = nil;
103-
[[UADSBannerLoadModule sharedInstance] getDelegateForIDAndRemove:self.viewId];
104-
[USRVBannerBridge destroyBannerWithId: self.viewId];
103+
if (self.viewId != nil) {
104+
[[UADSBannerLoadModule sharedInstance] getDelegateForIDAndRemove:self.viewId];
105+
[USRVBannerBridge destroyBannerWithId: self.viewId];
106+
}
105107
}
106108

107109
@end

Tests/UnityAdsTests/UnityServices/Ads/Load/UADSBannerLoadModule/UADSBannerLoadModuleTests.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ - (void)test_calls_event_handler_for_multiple_failed_loads {
126126
[self validateEventHandlerIsCalledOnceWithErrorForIds: @[op1Id, op2Id]];
127127
}
128128

129+
- (void)test_create_banner_without_load_does_not_crash {
130+
@autoreleasepool {
131+
UADSBannerView *bannerView = [[UADSBannerView alloc] initWithPlacementId:kUADSLoadModuleTestsPlacementID size:CGSizeMake(320.0, 50.0)];
132+
}
133+
}
134+
129135
- (void)validateEventHandlerIsCalledOnceWithSuccessForIds: (NSArray *)opIds {
130136
XCTAssertEqual(_eventHandlerMock.startedCalls.count, opIds.count);
131137
XCTAssertEqual(_eventHandlerMock.onSuccessCalls.count, opIds.count);

UnityAds.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = 'UnityAds'
3-
s.version = '4.7.0'
3+
s.version = '4.7.1'
44
s.license = { :type => 'Unity License', :file => 'LICENSE' }
55
s.author = { 'UnityAds' => '[email protected]' }
66
s.homepage = 'https://unity3d.com/services/ads'
77
s.summary = 'Monetize your entire player base and reach new audiences with video ads.'
88
s.platform = :ios
9-
s.source = { :http => 'https://github.com/Unity-Technologies/unity-ads-ios/releases/download/4.7.0/UnityAds.zip' }
9+
s.source = { :http => 'https://github.com/Unity-Technologies/unity-ads-ios/releases/download/4.7.1/UnityAds.zip' }
1010
s.ios.deployment_target = '9.0'
1111
s.ios.vendored_frameworks = 'UnityAds.xcframework'
1212
s.swift_version = '5.0'

0 commit comments

Comments
 (0)