Apple insists that the US government doesn't have backdoor access to its data (despite signs to the contrary). So what happens when law enforcement comes knocking at the company's door, then? We have a fairly good idea as of this week. The company has published guidelines showing just what data it can provide to the authorities and the legal steps needed to get that information. As a rule, Apple can hand over anything from iCloud and its stores as long as there's a proper court order, subpoena or warrant. It can also pull call records, contacts, text messages and media from locked iOS devices sent to its headquarters in Cupertino, although calendars, email and third-party apps are off-limits.
The company goes into significant detail about what it won't do. It doesn't intercept either FaceTime calls or iMessage chats, since they're always encrypted; while some security researchers believe it's possible to scoop up iMessages, Apple doesn't plan on doing that itself. The tech firm also can't remotely switch on Find My iPhone or grab GPS information, so don't expect Apple to lead the feds to your door. Apple will warn you if the government is requesting information, but it will stay silent if a heads-up is either illegal or likely to put someone in immediate danger.
The policies are largely in line with those of other tech giants, and it's clear that Apple wants formal requests before it turns over anything sensitive. As Ars Technica suggests, though, the only surefire way to prevent Apple (or any other third-party) from disclosing data is to keep it to yourself.