Facebook Inc.'s (FB) data breach scandal and Alphabet Inc. (GOOGL) Google's frequent run-ins with European regulators highlight Apple Inc.’s (AAPL) "competitive advantage" over its big tech rivals, according to brokerage firm UBS.

In a research note, reported on by Business Insider and MarketWatch, analyst Steven Milunovich claimed that Facebook and Google’s controversial inability to protect users’ data isn’t an issue that Apple has to worry about because its business model mainly focuses on monetizing hardware, rather than internet and software. The analyst noted that operating in this fashion ensures that the iPhone maker, unlike its peers, is not heavily dependent on generating big revenues from data-hungry advertisers and, as a result, can continue to stand firm on its policy not to share user information for marketing purposes.

"Although Apple sometimes speaks of privacy on moral grounds — Tim Cook says 'privacy is a fundamental human right' — its business model makes emphasizing privacy easier than for Google or Facebook,” wrote Milunovich in the note to clients. “Monetizing hardware has its advantages in creating trust. People tend not to worry about privacy — until they do.”

In a period when tech companies are coming under heavy scrutiny for how they handle user data, Milunovich claimed that Apple’s ability to abide by privacy laws offers numerous benefits. The iPhone maker’s unique position ought to cement its popularity among increasingly suspicious consumers, he said, while also insulating it from the potentially damaging new privacy-related regulations that are set to come into force. (See also: WhatsApp Co-founder Joins "#DeleteFacebook" Chorus.)

That includes the European Union's General Data Protection Regulation (GDPR), a new set of laws that from May 25 will restrict the kinds of data that companies can collect. Deutsch Bank predicts that this new policy alone could erase as much as $2 billion off Google’s revenues. (See also: Facebook Valuation Plunges to Lowest Since IPO.)

Milunovich drew on previous examples to emphasize how government actions have weakened tech companies in the past. The analyst predicted that today’s platform giants risk struggling like Microsoft Corp. (MSFT) and International Business Machines Corp. (IBM) did when they both faced the wrath of regulators.