Republican presidential hopeful Donald Trump has called for a boycott of Apple products until the tech giant complies with a judge’s order to help hack the phone of a shooter in the deadly San Bernardino terror attack.

Apple announced Wednesday that the company will fight a federal magistrate's order to help the Obama administration break into an encrypted iPhone belonging to one of the shooters in last December's attack that killed 14 people.

Related: Apple ups the ante in Silicon Valley's encryption battle with government

“I like the idea of ‘boycott Apple’ until such time as they give that information, I think that’s a great idea,” Trump said, during a rally at Pawley’s Island, S.C.

“First of all, the phone is not even owned by this young thug that killed all these people – the phone’s owned by the government,” he said, aiming a jab at the Apple CEO. “Tim Cook is looking to do a big number, probably to show how liberal he is.”

Related: Why Apple's security battle with the FBI is a PR masterstroke

However, multiple media reports noted Friday that Trump's official Twitter account tweeted about his boycott call from an iPhone. In a subsequent tweet Trump said that he uses both iPhone and Samsung. "If Apple doesn't give info to authorities on the terrorists I'll only be using Samsung until they give info," he added.

Social media giants Facebook and Twitter have backed Apple in its dispute with the FBI, as has Google CEO Sundar Pichai. Experts have also lauded Apple’s move as a PR masterstroke.

Related: John McAfee vows he can break iPhone encryption, promises to eat his shoe on live TV if he can't

This not the first time that Trump has weighed in on technology issues. Last year he surprised his rivals during a debate when he suggested clamping down on Internet connectivity as a way to limit ISIS’ ability to recruit and raise funds online.