A man walks down a busy high street towards a well-known coffee chain. As he gets within 500 yards of the café, his mobile phone buzzes in his pocket with an advert from the company offering him a discount on a cup of coffee.
It might sound like a scene from the science fiction film Minority Report, but personalised advertising techniques such as this are closer to becoming a reality than ever before.
When Apple announced the latest update to the iPhone this week, most headlines revolved around the device's "multitasking capabilities", which will allow users to run more than one application at once. The revelation that Apple intends to join the lucrative online advertising market was largely ignored.
With the "iAd", Apple has created a mobile advertising platform which will make it easy for developers to embed advertising inside their apps. The company will keep 40 per cent of the revenue and says it hopes to be sending out more than one billion ad impressions by the end of the year.
The move is part of a wider tactical shift by the San Francisco computer giant to carve itself a slice of the highly lucrative mobile phone advertising market, currently dominated by its rivals Google and Microsoft.
But the prospect of phone users being bombarded with adverts depending on where they are also raises privacy issues. Many of the most popular applications on the iPhone – and other smartphones such as those that run on Google's Android platform – use so-called "location services" which tell developers where consumers are when they use their software.
Currently, iPhone users have to opt in to allow the application to use their location which, if they agree, provides companies with valuable information about their customers. But the new version of the iPhone will be able to operate multiple applications which will be able to continually update developers of their progress.
If a user was to remain signed in to their Facebook account permanently and had agreed to share their location, their phone could handily alert them if one of their friends wandered within half a mile of their location. But this would also allow the social networking site to build up a detailed picture of their daily movements.
Such data is a treasure trove to retailers. Kim Mai-Cutler, a technology specialist writing on the Mobile Beat website, said: "McDonald's could theoretically serve 10,000 people mobile ads in a city and receive analytics showing what percentage of them later actually visited a McDonald's. That's much more measurable than buying a 30-second [advert] on TV, which can't return granular data on how it affected purchasing behaviour."
Rik Fergusson, a cyber security expert at Trend Micro, said location services also raise security dilemmas. "Many people unwittingly publish huge amounts of data about themselves from their smartphones, such as location and whether they'll be away from home for a long time," he said. "That kind of information is like gold dust to robbers. If you want to be safe, think very carefully about every time you allow an application to show your location."