diff --git a/Countly.m b/Countly.m index 13eade3a..7f40a66f 100644 --- a/Countly.m +++ b/Countly.m @@ -200,6 +200,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