AN IPHONE app proved the undoing of a drug addict who had assaulted and robbed a woman, as it led police straight to the Tranent home where she had hidden it.

Amanda Bain launched the unprovoked attack on Ashley Grant as she made her way along the town's Lindores Drive in the early hours.

Bain, accompanied by an unknown male, approached Ms Grant and asked her for change but then attempted to grab the woman's purse from her.

A struggle erupted between the two women and Ms Grant had her jumper pulled over her head before being punched in the face by Bain.

Bain then pulled the woman to the ground, where she was held down and the unknown male rifled through her pockets, stealing the cigarettes and the phone.

Both thieves then ran off, leaving Ms Grant to make her way to a friend's home to raise the alarm following the attack, which took place at about 1.50am on October 9 last year.

Ms Grant then used the phone app 'Find my iPhone' and police were soon contacted, where they trailed the signal to an address at the town's Northfield.

Once inside the property, officers rang Ms Grant's mobile number and heard the stolen phone vibrating under a mattress.

Bain immediately told officers: "It wasn't Frank, it was me."

That comment was in relation to co-accused Francis McMillan, who had his not guilty pleas to the attack accepted by the Crown.

Details of the assault and theft were heard at Edinburgh Sheriff Court last Tuesday, where Bain, described as a prisoner of Edinburgh Prison, appeared in the dock from custody.

Fiscal depute Kim Schofield said: "Ashley Grant was walking home at 1.50am at Lindores Drive and was approached by a male and a female.

"The female, Amanda Bain, asked her for change and attempted to snatch the purse from her.

"A struggle ensued between the accused and the complainer where the complainer's jumper was pulled over her head. Throughout she was shouting and screaming for help.

"She was punched to the face by the accused, who took hold of her hair and attempted to pull her to the ground.

"She was then held down on the ground by the accused as a male searched through her pockets."

Angela Craig, defending, told the court that her 37-year-old client had "a long-standing heroin addiction" and had become involved in the crack cocaine scene after "becoming involved with others".

Ms Craig added: "She was in the throws of addiction when she committed this horrible offence."

The brief added that Bain had had a previous drug treatment and testing order (DTTO) revoked and she was currently serving a four-month prison sentence for a separate offence.

Ms Craig, who also passed a letter of apology from Bain to Sheriff Thomas Welsh, said there had been "no pre-planning" to the attack and she was now on a methadone prescription while in prison.

Bain had a not guilty plea to a second similar attack accepted by the Crown.

Sheriff Welsh deferred sentence to January 27 for the preparation of reports.

Bain admitted to assaulting Ms Grant and robbing her at Lindores Drive, Tranent, on October 9 last year.

She was cleared of a second allegation of assaulting and robbing Danielle Stafford between High Street and Lindores Drive, Tranent, on the same date.