Donald Trump. REUTERS/Rainier Ehrhardt Real-estate mogul Donald Trump criticized Apple on Wednesday for denying a government request to hack into the cellphone of one of the San Bernardino shooters.

"To think that Apple won't allow us to get into her cellphone? Who do they think they are? No, we have to open it," Trump said during an interview on "Fox & Friends."

The Republican presidential front-runner called it a matter of common sense:

I agree 100% with the courts. In that case, we should open it up. I think security overall — we have to open it up. And we have to use our heads. We have to use common sense. Somebody the other day called me a common-sense conservative. We have to use common sense. Our country has so many problems.

It has been months since two shooters attacked a community center in San Bernardino, California, in early December, and law-enforcement officials still can't get into an iPhone belonging to one of the killers.

The FBI's director, James Comey, told a Senate committee earlier this month that officials hadn't been able to get past the locking feature on the device.

The encrypted phone is also equipped with a security feature that erases the phone's data after too many unsuccessful password attempts, according to the Associated Press. A US magistrate has ordered Apple to provide software that could break through that feature, allowing authorities to try every possible password combination to unlock the device.

Apple CEO Tim Cook published a strongly worded letter Wednesday calling the demand "chilling" and arguing that it "would undermine the very freedoms and liberty our government is meant to protect."

"The government suggests this tool could only be used once, on one phone," Cook said in the letter. "But that's simply not true. Once created, the technique could be used over and over again, on any number of devices. In the physical world, it would be the equivalent of a master key, capable of opening hundreds of millions of locks — from restaurants and banks to stores and homes. No reasonable person would find that acceptable."

But Trump dismissed Apple's defense during his Fox News interview.

"Apple — this is one case and this is a case that certainly we should be able to get into the phone," he said. "And we should find out what happened, why it happened, and maybe there's other people involved. And we have to do that."

The police found two crushed cellphones in a trash can near the site of the San Bernardino attack. The iPhone that law-enforcement officials are now trying to access is a county-owned work phone that was used by Syed Rizwan Farook.

He and his wife, Tashfeen Malik, died in a shootout with the police after they carried out the December attack at the Inland Regional Center. The attack killed 14 people and left at least 21 others injured.

The shooters pledged allegiance to the terrorist group ISIS, also known as the Islamic State, ISIL, or Daesh, right before the attacks.

Rob Price contributed to this report.