Apple CEO Tim Cook said he plans to fight a federal court order to help the FBI hack into an iPhone used by one of the San Bernardino shooters.