Skip to content

Commit 3561567

Browse files
jpsimniilohlin
authored andcommitted
Remove GLKView support (pointfreeco#507)
OpenGL types have been marked as deprecated starting with iOS 12, so if you compile SnapshotTesting with a minimum OS target version of iOS 12 or higher, you get the following compiler warning: ``` SnapshotTesting/Sources/SnapshotTesting/Common/View.swift:585:31: error: 'GLKView' was deprecated in iOS 12.0: OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) if let glkView = self as? GLKView { ^ ``` Because Swift has no mechanism to silence deprecation warnings, I propose removing snapshotting support for `GLKView`. Users of Snapshotting can still maintain support for snapshotting `GLKView`s with a custom snapshot strategy.
1 parent 08489fc commit 3561567

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Sources/SnapshotTesting/Common/View.swift

-5
Original file line numberDiff line numberDiff line change
@@ -730,11 +730,6 @@ extension View {
730730
#endif
731731
return perform()
732732
}
733-
#if (os(iOS) && !targetEnvironment(macCatalyst)) || os(tvOS)
734-
if let glkView = self as? GLKView {
735-
return Async(value: inWindow { glkView.snapshot })
736-
}
737-
#endif
738733
if let scnView = self as? SCNView {
739734
return Async(value: inWindow { scnView.snapshot() })
740735
} else if let skView = self as? SKView {

0 commit comments

Comments
 (0)