@Invalidating property wrapper availability

Hi all!

I'm very excited about the new @Invalidating property wrapper introduced in the "What's new in AppKit" session. However, after installing Xcode 13 and using it in my code, I get a compiler error saying "Unknown attribute 'Invalidating'"

Also, I can't find anything in the documentation about the property wrapper in question or the NSViewInvalidating protocol it relies on.

Is it available yet, or is it restricted to macOS 12 only?

Thank you!

From what I've read online it wasn't available in the early Xcode 13 betas, but supposedly it's available in the current one. You might try upgrading Xcode 13 and see how you go.

If you need a version that works back to Xcode 11, macOS 10.11 and iOS 11, I wrote an alternate version with basically the same functionality. It's MIT and the code is available so you can go nuts with it! It should work with any project that supports Swift 5.1 (when propertyWrappers and static subscripts were introduced)

You can find it here

It's now available in beta 2.

If you're looking to use it on an earlier version, I backported @Invalidating for older platforms and it effectively has the exact syntax, types, naming and functionality as the Apple's. You can find it here - https://github.com/theblixguy/Invalidating

@Invalidating property wrapper availability
 
 
Q