Swift UI middleware.