Skip to content

Remove GLKView support #507

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 1 commit into from
Jan 7, 2022

Conversation

jpsim
Copy link
Contributor

@jpsim jpsim commented Aug 19, 2021

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 GLKViews with a custom snapshot strategy.

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.
@jpsim jpsim marked this pull request as ready for review August 19, 2021 20:15
Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

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

This looks reasonable to us, thanks!

@stephencelis stephencelis merged commit 59f0889 into pointfreeco:main Jan 7, 2022
@jpsim jpsim deleted the remove-glkview-support branch January 7, 2022 21:18
@jpsim
Copy link
Contributor Author

jpsim commented Jan 7, 2022

Thanks @stephencelis !

niil-qb pushed a commit to quickbit/swift-snapshot-testing that referenced this pull request Feb 23, 2023
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.
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.

2 participants