Skip to content

Inconsistent iOS Version Compatibility Checks #1

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

Closed
ibelab opened this issue May 15, 2025 · 1 comment
Closed

Inconsistent iOS Version Compatibility Checks #1

ibelab opened this issue May 15, 2025 · 1 comment

Comments

@ibelab
Copy link

ibelab commented May 15, 2025

The library contains inconsistent iOS version compatibility checks which could lead to runtime issues.

For example, in UIButton+SwiftlyUI.swift, there are implementations using iOS 15 features:

@available(iOS 15.0, *)
public extension UIButton {
    
    convenience init(configuration: () -> UIButton.Configuration) {
        self.init(configuration: configuration())
    }
    
    // ...more code...
}

However, the README claims:

企业级兼容 支持 iOS 13+,完美适配存量项目

(Enterprise-level compatibility, supports iOS 13+)

Issues

  1. Some code conditionally checks for iOS 13+ but other sections require iOS 15+ without fallbacks
  2. No clear documentation about which features require which iOS versions
  3. No compile-time safety for users who might accidentally use iOS 15+ features on iOS 13 targets

Proposed Solution

  1. Add clear version requirements in README (feature by feature)
  2. Implement fallbacks for iOS 13-14 where possible
  3. Create a version compatibility guide
  4. Add runtime version checks to prevent crashes

This would improve the library's usability across different iOS versions.

@CoderLineChan
Copy link
Owner

Thank you for raising this issue!
The inconsistencies in iOS version checks have been addressed, and the necessary fixes have been made.
We’ve ensured better compatibility across versions as claimed, and the README has been updated accordingly.

Feel free to let us know if you spot anything else!

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

2 participants