File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -641,10 +641,16 @@ - (void)testLoggingCommerceEvent {
641641}
642642
643643- (void )testLoggingCommerceEventToUpload {
644+ // Ensure upgrade date is set by simulating an app upgrade BEFORE session begins
645+ MPApplication_PRIVATE *application = [[MPApplication_PRIVATE alloc ] init ];
646+ application.storedVersion = @" 1.0.0" ; // Set a different version to trigger upgrade detection
647+ [MPApplication_PRIVATE updateLaunchCountsAndDates ]; // This will set the upgrade date
648+
644649 dispatch_sync ([MParticle messageQueue ], ^{
645650 [self .backendController beginSession ];
646651 });
647652 self.session = self.backendController .session ;
653+
648654 MPCommerceEvent *commerceEvent = [[MPCommerceEvent alloc ] initWithAction: MPCommerceEventActionClick];
649655 commerceEvent.customAttributes = @{@" key" :@" value" };
650656
You can’t perform that action at this time.
0 commit comments