diff --git a/libs/SalesforceSDKCore/SalesforceSDKCoreTests/SalesforceSDKManagerTests.m b/libs/SalesforceSDKCore/SalesforceSDKCoreTests/SalesforceSDKManagerTests.m index a14d965b3f..b4caa208f5 100644 --- a/libs/SalesforceSDKCore/SalesforceSDKCoreTests/SalesforceSDKManagerTests.m +++ b/libs/SalesforceSDKCore/SalesforceSDKCoreTests/SalesforceSDKManagerTests.m @@ -195,7 +195,7 @@ - (void)testSnapshotRespondsToStateEvents UIScene *scene = UIApplication.sharedApplication.connectedScenes.allObjects.firstObject; [[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidEnterBackgroundNotification object:scene]; XCTAssertTrue(presentOnBackground, @"Did not respond to scene background."); - [[NSNotificationCenter defaultCenter] postNotificationName:UISceneWillEnterForegroundNotification object:scene]; + [[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidActivateNotification object:scene]; XCTAssertTrue(dismissOnDidBecomeActive, @"Did not respond to app did become active."); } @@ -241,7 +241,7 @@ - (void)testDefaultSnapshotViewControllerIsProvided // This will simulate that the snapshot view is being presented UIView* fakeView = [UIView new]; [fakeView addSubview:defaultViewControllerOnPresentation.view]; - [[NSNotificationCenter defaultCenter] postNotificationName:UISceneWillEnterForegroundNotification + [[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidActivateNotification object:scene]; XCTAssertEqual(defaultViewControllerOnPresentation, defaultViewControllerOnDismissal, @"Default snapshot view controller on dismissal is different than the one provided on presentation!"); } @@ -288,7 +288,7 @@ - (void)testCustomSnapshotViewControllerIsUsed // This will simulate that the snapshot view is being presented UIView* fakeView = [UIView new]; [fakeView addSubview:customSnapshot.view]; - [[NSNotificationCenter defaultCenter] postNotificationName:UISceneWillEnterForegroundNotification object:scene]; + [[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidActivateNotification object:scene]; XCTAssertEqual(customSnapshot, snapshotOnDismissal, @"Custom snapshot view controller was not used on dismissal!"); }