He added: 'So we choose a different path, collecting as little of your data as possible, being thoughtful and respectful when it's in our care because we know it belongs to you'.
Cook also seemed to take a swipe at Facebook, which has endured a barrage of negative press following the Cambridge Analytica scandal, by saying that Apple rejects the idea that privacy and technological innovation are mutually exclusive.
Facebook came under fire earlier this year after it disclosed that it had harvested personal data of up to 87 million users through a political data analytics firm called Cambridge Analytica. Apple does a large amount of its business in China, and Cook has talked about China being Apple's future biggest market.
In his delivery of the university's keynote address, Cook congratulated the university's graduating seniors, advising them to "look back over you shoulder fondly and say goodbye to act one of your life and then quickly look forward".
When asked what he would do if he were in Zuckerberg's shoes, Cook replied: 'I wouldn't be in this situation'. We've elected not to do that'. However, it's not just the social media giant that does such things.
Cook on Sunday again aimed to paint Apple's handling of user data in stark contrast with Facebook's. When Cook criticized Facebook on data privacy in an interview with MSNBC last month, it prompted an uncharacteristically sharp rebuke from Facebook CEO Mark Zuckerberg. We fail to guarantee the every student the right to a good education.
Apple has had a few tangles with privacy issues as well. Apple made the move after it unsuccessfully fought to be exempt from a controversial new cybersecurity law in the Asian nation, but the decision alarmed privacy advocates.
Apple has less need for data after closing its advertising division, iAd, in 2016; and iOS apps are subject to much stricter terms than Android equivalents about what information they can collect.
In his tweet following the commencement ceremony, Cook congratulated the students and encouraged them to be fearless.