Skip to content

BaherTamer/SwiftSafeUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Cover

License

SwiftSafeUI

SwiftSafeUI is a Swift package designed to streamline the management of deprecated SwiftUI APIs across iOS versions. It provides a clean and efficient way to handle deprecation logic, ensuring your app always uses the latest APIs while seamlessly falling back to older, deprecated ones when necessary.


Why Deprecation Handling Matters?

As SwiftUI evolves, Apple frequently introduces new APIs and deprecates older ones. Supporting multiple iOS versions can lead to technical debt, as developers need to maintain compatibility without cluttering their code with version checks, conditional logic, and workarounds. Over time, this can make the codebase harder to maintain, slower to adapt to new changes, and more prone to bugs.


What SwiftSafeUI Solves?

SwiftSafeUI simplifies this process by encapsulating deprecation handling into reusable components. It helps you:

  1. Use the latest SwiftUI APIs without worrying about breaking older iOS versions.
  2. Reduce boilerplate code by centralizing version checks and fallback logic.
  3. Maintain a clean and future-proof codebase while supporting a wide range of iOS versions.
  4. Minimize technical debt by providing a structured approach to deprecation handling, ensuring your code remains scalable and maintainable as SwiftUI continues to evolve.

📝 Requirements

  • iOS 13.0+

🔩 Installation

🔨 For Xcode Projects

  1. In Xcode, select Add Packages from the File menu.
  2. Enter /~https://github.com/BaherTamer/SwiftSafeUI in the search field.
  3. Click Add Package (Set the Dependency Rule to Up to Next Major Version)
  4. After adding the package, you will be able to import SwiftSafeUI in your project by using.
import SwiftSafeUI

📦 For Swift Packages

Add a dependency in your Package.swift

dependencies: [
    .package(
        url: "/~https://github.com/BaherTamer/SwiftSafeUI.git",
        .upToNextMajor(from: "1.4.0")
    )
]

📄 Documentation

For detailed usage examples, instructions, and tips, visit the SwiftSafeUI Documentation.


🌟 Support

If this project has been helpful to you, consider giving it a ⭐ on GitHub! Your support encourages continued development and improvements. We appreciate it!


⚖️ License

SwiftSafeUI is available under the MIT license. See the LICENSE file for more details.


Made with 💚