Apple has investigated claims that some iOS apps secretly record your screen as you use them, telling developers that use such code that they could be removed from the App Store.

It responded to a report by TechCrunch that a selection of apps for iPhone and iPad record user gestures without permission. The analytics code was found in several applications, including those from Hotels.com, Hollister and Expedia, yet rarely did any of them inform the user of its presence or intentions. Not even in the terms and conditions, in some cases.

Apple is demanding that the code is either taken out of offending apps or, at the very least, users are clearly told that their inputs are being recorded: "Protecting user privacy is paramount in the Apple ecosystem. Our App Store Review Guidelines require that apps request explicit user consent and provide a clear visual indication when recording, logging or otherwise making a record of user activity," it said.

"We have notified the developers that are in violation of these strict privacy terms and guidelines, and will take immediate action if necessary."

The third-party analytics tool in question is provided by Glassbox and is also present in Android apps. Google is yet to comment, although its own rules are similar to Apple's: "Apps must not hide or cloak tracking behaviour or attempt to mislead users about such functionality," they contain.

Glassbox's software records activity so that companies can redesign their apps for the best user experience. However, session replays were also found, by TechCrunch, to occasionally reveal sensitive data, such as unencrypted credit card numbers, to employees of Air Canada.

Glassbox itself responded saying that its tool is not designed to be used for "spying", rather making your app experiences better: "Glassbox and its customers are not interested in spying on consumers. Our goals are to improve online customer experiences and to protect consumers from a compliance perspective," it said in a statement.

"No data collected by Glassbox customers is shared with third parties, nor enriched through other external sources."

At least now though, you should be informed when a company is about to secretly record your on screen behaviour.