Since $X$ takes values in $\{ - 1, 1 \}$, then $e^{i t X}$ takes values in $\{ e^{i t}, e^{- i t} \}$. Applying results
then gives
\begin{equation}
\begin{split}
\mathbb{E}(e^{i t X})
& = e^{i t \cdot 1} \mathbb{P}(X = 1) + e^{i t \cdot (-1)} \mathbb{P}(X = -1) \\
& = \frac{1}{2} e^{i t} + \frac{1}{2} e^{- i t} \\
& = \frac{1}{2} (e^{i t} + e^{- i t}) \\
& = \cos(t)
\end{split}
\end{equation}
$\square$