Skip to content

Commit 021236f

Browse files
authored
Merge branch 'staging' into content-improvements
2 parents 8432000 + 9f9fb38 commit 021236f

File tree

9 files changed

+1017
-16
lines changed

9 files changed

+1017
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## xx.xx.xx
22
* Mitigated an issue with content action json parsing due to json encoding
3+
* Mitigated an issue where pausing a view resulted in a '0' view duration.
4+
* Mitigated an issue where an internal timer was not reset when going to foreground for `autoStoppedViews`
5+
* Mitigated an issue for `autoStoppedViews` could have not started when multiple views were open at the same time while going to foreground
36

47
## 24.7.4
58
* Added visionOS build support

Countly.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,13 @@ - (void)suspend
400400

401401
isSuspended = YES;
402402

403+
[CountlyViewTrackingInternal.sharedInstance applicationDidEnterBackground];
404+
403405
[CountlyConnectionManager.sharedInstance sendEventsWithSaveIfNeeded];
404406

405407
if (!CountlyCommon.sharedInstance.manualSessionHandling)
406408
[CountlyConnectionManager.sharedInstance endSession];
407409

408-
[CountlyViewTrackingInternal.sharedInstance applicationDidEnterBackground];
409-
410410
[CountlyPersistency.sharedInstance saveToFile];
411411
}
412412

Countly.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
3961C6BA2C6633C000DD38BA /* CountlyWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3961C6B42C6633C000DD38BA /* CountlyWebViewManager.m */; };
3737
3964A3E72C2AF8E90091E677 /* CountlySegmentationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3964A3E62C2AF8E90091E677 /* CountlySegmentationTests.swift */; };
3838
3966DBCF2C11EE270002ED97 /* CountlyDeviceIDTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3966DBCE2C11EE270002ED97 /* CountlyDeviceIDTests.swift */; };
39+
3969D0232CB80848000F8A32 /* CountlyViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3969D0222CB80848000F8A32 /* CountlyViewTests.swift */; };
3940
3972EDDB2C08A38D00EB9D3E /* CountlyEventStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3972EDDA2C08A38D00EB9D3E /* CountlyEventStruct.swift */; };
4041
3979E47D2C0760E900FA1CA4 /* CountlyUserProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3979E47C2C0760E900FA1CA4 /* CountlyUserProfileTests.swift */; };
4142
399117D12C69F73D00DC4C66 /* CountlyContentBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 399117CD2C69F73D00DC4C66 /* CountlyContentBuilder.m */; };
@@ -133,6 +134,7 @@
133134
3961C6B42C6633C000DD38BA /* CountlyWebViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CountlyWebViewManager.m; sourceTree = "<group>"; };
134135
3964A3E62C2AF8E90091E677 /* CountlySegmentationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountlySegmentationTests.swift; sourceTree = "<group>"; };
135136
3966DBCE2C11EE270002ED97 /* CountlyDeviceIDTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountlyDeviceIDTests.swift; sourceTree = "<group>"; };
137+
3969D0222CB80848000F8A32 /* CountlyViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountlyViewTests.swift; sourceTree = "<group>"; };
136138
3972EDDA2C08A38D00EB9D3E /* CountlyEventStruct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountlyEventStruct.swift; sourceTree = "<group>"; };
137139
3979E47C2C0760E900FA1CA4 /* CountlyUserProfileTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountlyUserProfileTests.swift; sourceTree = "<group>"; };
138140
399117CD2C69F73D00DC4C66 /* CountlyContentBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CountlyContentBuilder.m; sourceTree = "<group>"; };
@@ -221,6 +223,7 @@
221223
3966DBCE2C11EE270002ED97 /* CountlyDeviceIDTests.swift */,
222224
3964A3E62C2AF8E90091E677 /* CountlySegmentationTests.swift */,
223225
399B464F2C52813700AD384E /* CountlyLocationTests.swift */,
226+
3969D0222CB80848000F8A32 /* CountlyViewTests.swift */,
224227
);
225228
path = CountlyTests;
226229
sourceTree = "<group>";
@@ -470,6 +473,7 @@
470473
buildActionMask = 2147483647;
471474
files = (
472475
1A5C4C972B35B0850032EE1F /* CountlyTests.swift in Sources */,
476+
3969D0232CB80848000F8A32 /* CountlyViewTests.swift in Sources */,
473477
399B46502C52813700AD384E /* CountlyLocationTests.swift in Sources */,
474478
1A50D7052B3C5AA3009C6938 /* CountlyBaseTestCase.swift in Sources */,
475479
3979E47D2C0760E900FA1CA4 /* CountlyUserProfileTests.swift in Sources */,

CountlyTests/CountlyBaseTestCase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CountlyBaseTestCase: XCTestCase {
1313
var countly: Countly!
1414
var deviceID: String = ""
1515
let appKey: String = "appkey"
16-
var host: String = "https://test.count.ly/"
16+
var host: String = "https://testing.count.ly/"
1717

1818
override func setUpWithError() throws {
1919
// Put setup code here. This method is called before the invocation of each test method in the class.

CountlyTests/CountlyEventStruct.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ struct AnyCodable: Codable {
6161
struct CountlyEventStruct: Codable {
6262
let key: String
6363
let ID: String
64-
let CVID: String
64+
let CVID: String?
6565
let PVID: String?
66-
let PEID: String
66+
let PEID: String?
6767
let segmentation: [String: Any]?
6868
let count: UInt
6969
let sum: Double
@@ -81,9 +81,9 @@ struct CountlyEventStruct: Codable {
8181
let container = try decoder.container(keyedBy: CodingKeys.self)
8282
key = try container.decode(String.self, forKey: .key)
8383
ID = try container.decode(String.self, forKey: .ID)
84-
CVID = try container.decode(String.self, forKey: .CVID)
84+
CVID = try container.decodeIfPresent(String.self, forKey: .CVID)
8585
PVID = try container.decodeIfPresent(String.self, forKey: .PVID)
86-
PEID = try container.decode(String.self, forKey: .PEID)
86+
PEID = try container.decodeIfPresent(String.self, forKey: .PEID)
8787
count = try container.decode(UInt.self, forKey: .count)
8888
sum = try container.decode(Double.self, forKey: .sum)
8989
timestamp = try container.decode(TimeInterval.self, forKey: .timestamp)

0 commit comments

Comments
 (0)