Capture of 'notification' with non-sendable type 'NSNotification' in a `@Sendable` closure

Get this warning compiling with ios16 b5. anyone know what this is? no warning on ios15.

Capture of 'notification' with non-sendable type 'NSNotification' in a @Sendable closure

The line it shows on is:

let myObject = notification.object as! MyObject

I also noticed that NSNotificationCenter notifications in general seem to have broken in iOS16 betas. Are they getting removed?

Post not yet marked as solved Up vote post of ngb Down vote post of ngb
1.1k views