This PR primarily adds perception checking even for iOS 17. We originally omitted perception checking in iOS 17 because the library will delegate down to Swift's native observation tools, and so technically WithPerceptionTracking isn't necessary. But of course you may be deploying for iOS 16 and testing on iOS 17, and so you probably want to know if you leave off the wrapper view.
I have also fixed #9. We have specific logic in isInSwiftUIBody for checking if state is being accessed from a SwiftUI action closure (such as onDelete { … }), but that logic doesn't work when passing a method directly (i.e. onDelete(perform: delete)). The fix is easy enough.
This PR primarily adds perception checking even for iOS 17. We originally omitted perception checking in iOS 17 because the library will delegate down to Swift's native observation tools, and so technically
WithPerceptionTracking
isn't necessary. But of course you may be deploying for iOS 16 and testing on iOS 17, and so you probably want to know if you leave off the wrapper view.I have also fixed #9. We have specific logic in
isInSwiftUIBody
for checking if state is being accessed from a SwiftUI action closure (such asonDelete { … }
), but that logic doesn't work when passing a method directly (i.e.onDelete(perform: delete)
). The fix is easy enough.