-
-
Notifications
You must be signed in to change notification settings - Fork 368
fix(session-replay): Add exemption for CameraUI traversal for iOS 26.0 #6045
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
764affb
add sample for image picker
philprime 1d78058
add filtering of view subtree
philprime 91e5b9e
Merge remote-tracking branch 'origin/main' into issue-5647
philprime 9645f50
Update Sources/Swift/Core/Tools/ViewCapture/SentryUIRedactBuilder.swift
philprime 21ce96f
adapted implementation based on feedback
philprime 10bf6b2
Merge remote-tracking branch 'origin/main' into issue-5647
philprime 29b5d96
update test cases
philprime b509201
add dynamic view init
philprime 3fb5c6e
update changelog
philprime 4e1515d
git commit -m "Fix duplicate redaction regions in mapRedactRegion method
philprime 77436a2
apply feedback from PR review
philprime a6cb389
Merge remote-tracking branch 'origin/main' into issue-5647
philprime 8085828
update changelog
philprime 86a4e82
add ui testing for iOS 26
philprime bfbc6d7
Merge remote-tracking branch 'origin/main' into issue-5647
philprime 8ac6e57
increase timeout to 10
philprime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Samples/iOS-Swift/iOS-Swift-UITests/SessionReplayUITests.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import XCTest | ||
|
Check failure on line 1 in Samples/iOS-Swift/iOS-Swift-UITests/SessionReplayUITests.swift
|
||
|
|
||
| class SessionReplayUITests: BaseUITest { | ||
|
|
||
| func testCameraUI_shouldNotCrashOnIOS26() { | ||
| // -- Arrange -- | ||
| // During the beta phase of iOS 26.0 we noticed crashes when traversing the view hierarchy | ||
| // of the camera UI. This test is used to verify that no regression occurs. | ||
| // See https://github.com/getsentry/sentry-cocoa/issues/5647 | ||
| app.buttons["Extra"].tap() | ||
| app.buttons["Show Camera UI"].tap() | ||
|
|
||
| // We need to verify the camera UI is shown by checking for the existence of a UI element. | ||
| // This can be any element that is part of the camera UI and can be found reliably. | ||
| // The "PhotoCapture" button is a good candidate as it is always present when the | ||
| // camera UI is shown. | ||
| let cameraUIElement = app.buttons["PhotoCapture"] | ||
| XCTAssertTrue(cameraUIElement.waitForExistence(timeout: 5)) | ||
|
|
||
| // After the Camera UI is shown, we keep it open for 10 seconds to trigger at least one full | ||
| // video segment captured (segments are 5 seconds long). | ||
| wait(10) | ||
philprime marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| private func wait(_ seconds: TimeInterval) { | ||
| let exp = expectation(description: "Waiting for \(seconds) seconds") | ||
| DispatchQueue.main.asyncAfter(deadline: .now() + seconds) { | ||
| exp.fulfill() | ||
| } | ||
| wait(for: [exp], timeout: seconds + 1) | ||
| } | ||
| } | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.