Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for snapshot dismissal #3778

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Conversation

bbirman
Copy link
Member

@bbirman bbirman commented Nov 25, 2024

In #3679 I changed the notification we use to dismiss snapshot from UISceneDidActivateNotification to UISceneWillEnterForegroundNotification because UISceneDidActivateNotification isn't called for screen mirroring and I thought UISceneWillEnterForegroundNotification could cover both cases. There's a new issue with using UISceneWillEnterForegroundNotification so this PR separates it into using UISceneDidActivateNotification for the main flow like it was originally and UISceneWillEnterForegroundNotification for the non-interactive/mirrored case

[self.snapshotViewControllers removeObject:scene.session.persistentIdentifier];
}

- (nullable UIScene *)sceneFromNotification:(NSNotification *)notification {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to check the object on the notification more safely

Copy link

github-actions bot commented Nov 25, 2024

1 Warning
⚠️ Static Analysis found an issue with one or more files you modified. Please fix the issue(s).

Clang Static Analysis Issues

File Type Category Description Line Col
SalesforceSDKManager Nil value used as mutex for @synchronized() (no synchronization will occur) Logic error Nil value used as mutex for @synchronized() (no synchronization will occur) 147 5
SalesforceSDKManager Nil value used as mutex for @synchronized() (no synchronization will occur) Logic error Nil value used as mutex for @synchronized() (no synchronization will occur) 159 5

Generated by 🚫 Danger

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 33.33333% with 22 lines in your changes missing coverage. Please review.

Project coverage is 63.13%. Comparing base (8347820) to head (32fa134).

Files with missing lines Patch % Lines
...forceSDKCore/Classes/Common/SalesforceSDKManager.m 33.33% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3778      +/-   ##
==========================================
- Coverage   63.35%   63.13%   -0.22%     
==========================================
  Files         227      227              
  Lines       21590    21736     +146     
==========================================
+ Hits        13678    13723      +45     
- Misses       7912     8013     +101     
Components Coverage Δ
Analytics 84.09% <ø> (ø)
Common 68.96% <ø> (ø)
Core 52.53% <33.33%> (-0.24%) ⬇️
SmartStore 73.65% <ø> (ø)
MobileSync 87.58% <ø> (ø)
Files with missing lines Coverage Δ
...forceSDKCore/Classes/Common/SalesforceSDKManager.m 53.12% <33.33%> (-5.62%) ⬇️

... and 3 files with indirect coverage changes

---- 🚨 Try these New Features:

@bbirman
Copy link
Member Author

bbirman commented Nov 26, 2024

Merging because the failing test (testCredentialsCopying) looks like it started flapping before this PR. Looking into it but I haven't been able to repro locally yet

@bbirman bbirman merged commit 821bc4f into forcedotcom:dev Nov 26, 2024
11 of 14 checks passed
@bbirman bbirman deleted the window-notifications branch November 26, 2024 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants