For illustration purposes of Marty Cohen's answer, I generated $50$ data points ($i$ from $1$ to $50$), $x_i=i$, $y_i=12.34 \sin (x_i+2.345)+2(-1)^i$ (the error is quite large).
The largest absolute value of the $y_i$'s is $14.3129$. From there, the sum of the $\phi_i$'s equals $-1275.08$ so $\phi =-25.5017$; adding $9\pi$, this gives $\phi=2.7726$.
Using these estimates, I started a nonlinear regression which converged immediately and the final result is $y=12.3509 \sin (x+2.3454)$
If you are in big trouble, may be because of large errors, what you could do is the following : consider $\phi$ as fixed and so, $V(\phi)=\frac{\sum _{i=1}^n y_i \sin (x_i+\phi )}{\sum _{i=1}^n \sin ^2(x_i+\phi )}$ and now consider $SSQ(\phi)=\sum_{i=1}^n\Big(V(\phi)\sin(x_i+\phi)-y_i\Big)^2$ Plot $SSQ(\phi)$ as a function of $\phi$, try to locate a minimum. Now, you have all the elements for starting the nonlinear regression for the two parameters.