From b2ab2ad435b5ddbe62a4b9b3a9b188895f327a6c Mon Sep 17 00:00:00 2001 From: ijunaid Date: Mon, 22 Jul 2024 22:34:08 +0500 Subject: [PATCH] Send orientation during initialization and consent given for user details --- Countly.m | 2 ++ CountlyCommon.h | 2 ++ CountlyConsentManager.m | 1 + 3 files changed, 5 insertions(+) diff --git a/Countly.m b/Countly.m index 1c5c40a8..a23e585b 100644 --- a/Countly.m +++ b/Countly.m @@ -186,6 +186,8 @@ - (void)startWithConfig:(CountlyConfig *)config if (!CountlyCommon.sharedInstance.manualSessionHandling) [CountlyConnectionManager.sharedInstance beginSession]; + [CountlyCommon.sharedInstance recordOrientation]; + //NOTE: If there is no consent for sessions, location info and attribution should be sent separately, as they cannot be sent with begin_session request. if (!CountlyConsentManager.sharedInstance.consentForSessions) { diff --git a/CountlyCommon.h b/CountlyCommon.h index 5019add2..9eff5880 100644 --- a/CountlyCommon.h +++ b/CountlyCommon.h @@ -113,6 +113,8 @@ void CountlyPrint(NSString *stringToPrint); - (void)observeDeviceOrientationChanges; +- (void)recordOrientation; + - (BOOL)hasStarted_; @end diff --git a/CountlyConsentManager.m b/CountlyConsentManager.m index 9e5bd459..ebf015c1 100644 --- a/CountlyConsentManager.m +++ b/CountlyConsentManager.m @@ -283,6 +283,7 @@ - (void)setConsentForUserDetails:(BOOL)consentForUserDetails if (consentForUserDetails) { CLY_LOG_D(@"Consent for UserDetails is given."); + [CountlyCommon.sharedInstance recordOrientation]; [Countly.user save]; } else