Skip to content

Commit

Permalink
Fixing wkWebView.takeSnapshot with Xcode 14 & 15 (#692)
Browse files Browse the repository at this point in the history
This will fix this issue: #625
  • Loading branch information
teameh authored Jan 8, 2024
1 parent 9bfa0aa commit 8e68404
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/SnapshotTesting/Common/View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,11 @@
callback(Image())
return
}
wkWebView.takeSnapshot(with: nil) { image, _ in
let configuration = WKSnapshotConfiguration()
if #available(iOS 13, macOS 10.15, *) {
configuration.afterScreenUpdates = false
}
wkWebView.takeSnapshot(with: configuration) { image, _ in
callback(image!)
}
}
Expand Down

0 comments on commit 8e68404

Please sign in to comment.