A mysterious method suggested by a third party appears to have allowed the FBI to hack into the iPhone belonging to Syed Rizwan Farook, one of the attackers in last year’s shooting in San Bernardino, Calif., prompting the agency to withdraw its legal case against Apple.