Skip to content

Commit 20d1f1a

Browse files
authored
Merge pull request #434 from Countly/fix_multiple_content
fix: safeguard return
2 parents dafa256 + 690d982 commit 20d1f1a

7 files changed

Lines changed: 22 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
## XX.XX.XX
1+
## 25.4.9
22
* Added a new config option disableViewRestartForManualRecording to disable auto close/restart behavior of manual views on app background/foreground actions.
33
* Added a new config option "setWebviewDisplayOption: WebViewDisplayOption" to control how Content and Feedback Widgets are presented.
44
* IMMERSIVE mode (default): Full-screen display (except cutouts).
55
* SAFE_AREA mode: Omits status bar, navigation bar and cutouts when displaying WebView.
66

7+
* Mitigated an issue where multiple contents could have been displayed in parallel.
8+
79
## 25.4.8
810
* Mitigated an issue where "giveAllConsent" did not include metrics consent.
911

Countly-PL.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Countly-PL'
3-
s.version = '25.4.8'
3+
s.version = '25.4.9'
44
s.license = { :type => 'MIT', :file => 'LICENSE' }
55
s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.'
66
s.homepage = 'https://github.com/Countly/countly-sdk-ios'

Countly.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Countly'
3-
s.version = '25.4.8'
3+
s.version = '25.4.9'
44
s.license = { :type => 'MIT', :file => 'LICENSE' }
55
s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.'
66
s.homepage = 'https://github.com/Countly/countly-sdk-ios'

Countly.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@
808808
"@loader_path/Frameworks",
809809
);
810810
MACOSX_DEPLOYMENT_TARGET = 10.14;
811-
MARKETING_VERSION = 25.4.8;
811+
MARKETING_VERSION = 25.4.9;
812812
PRODUCT_BUNDLE_IDENTIFIER = ly.count.CountlyiOSSDK;
813813
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
814814
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -840,7 +840,7 @@
840840
"@loader_path/Frameworks",
841841
);
842842
MACOSX_DEPLOYMENT_TARGET = 10.14;
843-
MARKETING_VERSION = 25.4.8;
843+
MARKETING_VERSION = 25.4.9;
844844
PRODUCT_BUNDLE_IDENTIFIER = ly.count.CountlyiOSSDK;
845845
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
846846
PROVISIONING_PROFILE_SPECIFIER = "";

CountlyCommon.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ @interface CountlyCommon ()
2929
#endif
3030
@end
3131

32-
NSString* const kCountlySDKVersion = @"25.4.8";
32+
NSString* const kCountlySDKVersion = @"25.4.9";
3333
NSString* const kCountlySDKName = @"objc-native-ios";
3434

3535
NSString* const kCountlyErrorDomain = @"ly.count.ErrorDomain";

CountlyContentBuilderInternal.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,18 @@ - (void)enterContentZone {
6868

6969
if(_isCurrentlyContentShown){
7070
CLY_LOG_I(@"%s a content is already shown, skipping" ,__FUNCTION__);
71+
return;
7172
}
7273

7374
[self enterContentZone:@[]];
7475
}
7576

7677
- (void)enterContentZone:(NSArray<NSString *> *)tags {
78+
if(_isCurrentlyContentShown){
79+
CLY_LOG_I(@"%s a content is already shown, skipping" ,__FUNCTION__);
80+
return;
81+
}
82+
7783
[_minuteTimer invalidate];
7884
_minuteTimer = nil;
7985

@@ -121,6 +127,7 @@ - (void)refreshContentZone {
121127
}
122128
if(_isCurrentlyContentShown){
123129
CLY_LOG_I(@"%s a content is already shown, skipping" ,__FUNCTION__);
130+
return;
124131
}
125132

126133
[self exitContentZone];
@@ -151,6 +158,12 @@ - (void)fetchContents {
151158

152159
if (!CountlyServerConfig.sharedInstance.networkingEnabled)
153160
return;
161+
162+
if(_isCurrentlyContentShown){
163+
CLY_LOG_I(@"%s a content is already shown, skipping" ,__FUNCTION__);
164+
return;
165+
}
166+
154167
if ([self isRequestQueueLockedThreadSafe]) {
155168
return;
156169
}

CountlyTests/TestUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TestUtils {
1313
static let commonDeviceId: String = "deviceId"
1414
static let commonAppKey: String = "appkey"
1515
static let host: String = "https://testing.count.ly/"
16-
static let SDK_VERSION = "25.4.8"
16+
static let SDK_VERSION = "25.4.9"
1717
static let SDK_NAME = "objc-native-ios"
1818

1919
static func cleanup() -> Void {

0 commit comments

Comments
 (0)