In his book "Quantum field theory and the standard model", section 7.2 "Hamiltonian derivation" (of the Feynman rules), Schwartz states that the equations of motion $i\partial_t\phi(x)=[\phi,H]$ have the formal solution (eq 7.27)
$$ \phi(\vec x, t) = S(t,t_0)^\dagger\phi(\vec x)S(t, t_0)\tag{7.27} $$ where $S$ is the time evolution operator for the momentum eigenstates, and it satisfies $$ i\partial_t S(t, t_0)=H(t)S(t,t_0).\tag{7.28} $$
I tried to justify this expression, but I didn't manage. Here what I tried.
From $i\partial_t\phi(x)=[\phi(x),H(t)]$ I get $$ i\partial_t\phi(x) = i\partial_t[S^\dagger(t,t_0) \phi(\vec x)S(t,t_0)] = (i\partial_t S^\dagger(t,t_0)) \phi(\vec x)S(t,t_0) + S^\dagger(t,t_0)\phi(\vec x)(i\partial_t S(t,t_0)) = [S^\dagger(t,t_0)\phi(\vec x)S(t,t_0), H(t)] $$
Using the commutator identity, I expand the commutator on the rhs: $$ (i\partial_t S^\dagger) \phi(\vec x)S + S^\dagger\phi(\vec x)(i\partial_t S) = S^\dagger\phi(\vec x)[S,H] + [S^\dagger\phi(\vec x), H]S = S^\dagger\phi SH - S^\dagger\phi HS + S^\dagger\phi HS - HS^\dagger\phi S = S^\dagger\phi SH - HS^\dagger\phi S $$
For the lhs to be equal to the rhs I have to require: $$ i\partial_t S = SH $$ $$ i\partial_t S^\dagger = -HS^\dagger $$
But Schwartz claim is $i\partial_t S = HS$ and in general $S$ does not commute with $H$. Where am I wrong?