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

'onChange(of:perform:)' is only available in iOS 14.0 or newer #77

Open
Sega-Zero opened this issue Mar 14, 2023 · 2 comments
Open

'onChange(of:perform:)' is only available in iOS 14.0 or newer #77

Sega-Zero opened this issue Mar 14, 2023 · 2 comments

Comments

@Sega-Zero
Copy link

When target version is set to iOS 13, Menu.swift may not be compiled with an error:
PopoversExample — Menu swift 2023-03-14 22-30-07

I believe it should be workarounded with the solution from this article:
https://betterprogramming.pub/implementing-swiftui-onchange-support-for-ios13-577f9c086c9

Should I open a PR to fix this issue?

Sega-Zero added a commit to Sega-Zero/Popovers that referenced this issue Mar 14, 2023
Sega-Zero added a commit to Sega-Zero/Popovers that referenced this issue Mar 14, 2023
@aheze
Copy link
Owner

aheze commented Mar 20, 2023

Hmm... I'm considering dropping iOS 13 support because StateObject is only iOS 14+, and is pretty important in some changes I'm working on. I'll probably make a separate archived branch for iOS 13.

@shaps80
Copy link

shaps80 commented Nov 1, 2023

This is probably a good move overall, but FYI my backports re-implements @StateObject as well as onChange (and many others) which you could just copy/paste in to retain iOS 13+ if you wanted. Just a thought @aheze

SwiftUIBackports

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

No branches or pull requests

3 participants