Apple unleashed a flurry of product announcements at WWDC this week, many of them focused on a salient message for consumers: Apple cares about privacy.

Across its software platforms, Apple introduced new privacy-centric features aimed at helping customers guard their personal data more closely. Apple (AAPL) - Get Report shares were up 3.6% on Tuesday after dipping on Monday on concerns of a possible antitrust investigation by the government.

Several of the new privacy features were baked into iOS13, Apple's next-generation iPhone operating system that's due out this fall. They included an option to have Apple auto-generate a random email address when you sign on to new services, and a new setting that allows you to share location data with an app only once before the permission is revoked. Apple will also bar apps from scanning your bluetooth as a loophole in finding your location, and will bar third-party advertising and analytics in children's apps.

"For the first time, you can share your location to an app just once and then require it to ask you again next time it wants it," said Apple's head of software engineering, Craig Federighi, of the location sharing feature. "If you do choose to grant an app the ability to continually monitor your location in the background, we'll give you reports so you'll know what they're up to."

Perhaps the biggest privacy surprise was a new "Login with Apple" offering, Apple's answer to similar capabilities from Facebook (FB) - Get Report and Google (GOOGL) - Get Report that have been a feature of the Internet economy for years. What makes Apple's sign-in tool different is that, according to Apple, it won't track users that use the feature to create logins for third party apps and services, whereas Facebook and Google feed data gleaned from those logins for their advertising businesses.

Apple has long sought to position itself as a privacy-focused tech giant that isn't in the business of hoarding or selling user data. But Monday's privacy announcements were especially notable given reports that the U.S. Department of Justice and the Federal Trade Commission are gearing up to launch antitrust investigations into whether Amazon, Alphabet, Facebook and Apple are abusing their size to freeze out competitors.

That action is one culmination of growing criticism by regulators and lawmakers that major tech firms wield too much power over markets and consumers' lives. In recent months, prominent politicians such as presidential hopeful Sen. Elizabeth Warren have called for a breakup of Big Tech.

Any antitrust investigation of Apple will focus on whether its App Store marketplace is anti-competitive -- an issue that's also under review by the U.S. Supreme Court. But data privacy issues may well arise in regulatory probes of Facebook or Alphabet, and the issues has emerged as a winning one for both political parties as well as with consumers. 

"It's a real opportunity to be a market differentiator," said Matt Dumiak, director of privacy services at CompliancePoint, of Apple's new privacy offerings.

Dumiak added that with more states passing privacy legislation, it's only a matter of time before a federal law compels Big Tech to be accountable to regulators, and not just consumers, in how they handle privacy and security. 

"We may not think of it as a priority for this administration, but it very well could be," he added. "I wouldn't be surprised if within two years we see privacy legislation at the federal level."

Apple, Alphabet and Facebook areholdings in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells these stocks? Learn more now.