SwiftSafeUI

1.7.0

Encapsulates your SwiftUI deprecation handling logic.
BaherTamer/SwiftSafeUI

What's New

Version 1.7.0

2025-05-17T09:29:07Z

We’re excited to announce the release of SafeSwiftUI 1.7.0! This version includes new features and improvements to ensure compatibility with the latest OS versions and enhance your development experience. Below is a summary of the changes:

🌟 Features

⚠️ Breaking Changes

  • Remove safeLineLimit modifier due to inconsistencies and lack of functionality as expected.

πŸ“„ Documentation

  • Update SafeModifiers documentation to reflect the latest changes.
  • Update README to reflect the latest changes.

GitHub Cover

SwiftSafeUI

SwiftSafeUI is a Swift package designed to streamline the management of deprecated SwiftUI APIs across OS 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 with every release, Apple frequently introduces new APIs while deprecating older ones. Ignoring deprecated functionality can lead to accumulating technical debt, making your code harder to maintain and less adaptable to future changes. Without a proper strategy, version checks and workarounds can clutter your codebase, slowing down development and increasing the risk of bugs. Staying ahead of these changes ensures your app remains efficient, maintainable, and ready to leverage the latest SwiftUI improvements.


What SwiftSafeUI Solves?

SwiftSafeUI simplifies managing deprecated APIs in SwiftUI, providing a structured and efficient approach to handling version-specific UI changes across different OS versions. It helps you:

  1. Seamlessly handle deprecations: Automatically uses the latest SwiftUI APIs while gracefully falling back to older alternatives when needed.
  2. Reduce boilerplate and complexity: Eliminates the need for scattered version checks and conditional logic, centralizing compatibility handling.
  3. Future-proof your codebase: Ensures your app remains adaptable as SwiftUI evolves, reducing manual maintenance and technical debt.
  4. Improve scalability and maintainability: Keeps your UI code clean, structured, and responsive, regardless of the OS versions your app supports.
  5. Streamline SwiftUI development: Provides safe modifiers, views, and environment values that abstract away compatibility concerns, allowing you to focus on building features.

βš™οΈ Compatibility

Swift 5.9+ iOS 13.0+ iPadOS 13.0+ macOS 10.15+


πŸ”© 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.7.0")
    )
]

πŸ“„ Documentation

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


βš–οΈ License

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


⭐️ Support

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


Made with πŸ’š

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Jun 16 2025 00:20:04 GMT-0900 (Hawaii-Aleutian Daylight Time)