This article will talk about creating your own custom Swift Macro. It will cover 2 types of Macros: ExpressionMacro which helps you expand and help you write an expression; and AccessorMacro which adds set and get to a variable. It has some examples:
- Verify SF Symbol name and convert it to SwiftUI Image (or throw compile error if name is invalid)
- Verifies if String is valid URL and then convert it to URL object (or throw compile time error)
- Bind the value of a variable to that on iCloud key-value storage