Cook said Apple is not afraid of that commitment, even though maintaining it is going to be hard. The shareholders who spoke at the meeting backed him up on that.
There were no cameras allowed inside Apple's shareholder meeting, but the folks who came out said the company's struggle with the Justice Department was a major subject of discussion.
RELATED: ABC News exclusive one-on-one interview with Tim Cook
"We think that the FBI's attempt to force Apple to attack its own security is bad. It's bad for all of us who rely on the safety and trust of our devices," Cindy Cohn from the Electric Frontier Foundation said.
The fight is over the iPhone carried by San Bernardino terrorist Syed Farook. The FBI wants Apple to write software allowing agents to unlock the phone and find out what information is inside.
WATCH VIDEO: Apple CEO Tim Cook speaks about phone encryption battle with FBI
In an exclusive interview with ABC News anchor David Muir, Cook told him this week, creating that software wasn't going to happen.
He said, "We think it is bad news to write. We would never write it, we have never written it."
At the shareholders' meeting, Rev. Jesse Jackson, from the Rainbow Coalition, stood firmly in Cook's corner.
Jackson told reporters, "We deserve better and those companies that want to protect the integrity of the company, with the principals of America, must stand up and stand with Tim."
RELATED: US would let Apple keep software to help FBI hack iPhone
Apple filed a motion to block the FBI request Thursday saying it violated the company's First Amendment rights and the privacy rights organization the Electronic Frontier Foundation will file a supporting brief next week. https://www.eff.org/
"I think that Apple has The Constitution on their side, they have the law on their side, and the FBI is wrong about this," Cohn said.
With both sides having nearly unlimited resources this could shape up to be one epic battle.
Get more on stories about Apple here.