What are the new property wrappers since iOS 17 ?

Generated on 9/6/2024

1 search

Since iOS 17, new property wrappers have been introduced to help manage stored values more efficiently. These property wrappers encapsulate logic for managing stored values by intercepting calls to read and write a property, allowing for reusable logic to be applied with a simple annotation. An example mentioned is the argument property wrapper from the Swift ArgumentParser package, which designates that a property stores the value of a command line argument. This feature is part of Swift's extensibility improvements, as discussed in the session A Swift Tour: Explore Swift’s features and design (23:24).