Ed Sheeran could only listen to his collaboration with Taylor Swift on an iPad to ensure it wouldn't get leaked.

The 'Castle on the Hill' hitmaker has revealed the extreme measures his 'Bad Blood' hitmaker pal - who wrote ' puts in place to make sure no one hears her music online before its release date.

Asked if Taylor sends him her music to listen to before it's out, he told Capricho magazine:''She would never send new songs, no. I hear them but has to be with her.

''I remember when I did a song with her for her album, I was in San Francisco and they sent someone with a locked briefcase with an iPad and one song on it and they flew San Francisco and played the song I've done with her and asked if I like it and I was like 'yeah' and they took it back, that's how I hear it.''

Meanwhile, Ed previously opened up about his close bond with Taylor, admitting her 4th July party is the only celebrity party he attends every year.

He said: ''That was at Taylor Swift's 4th July party. That's the only [celebrity party] I do.''

And Ed admits both of them have a competitive streak and says they can take it ''too far'' sometimes.

He shared recently: ''There's an underdog element to it. Taylor was never the popular kid in school. I was never the popular kid in school. Then you get to the point when you become the most popular kid in school - and we both take it a bit too far.

''She wants to be the biggest female artist in the world and I want to be the biggest male artist in the world. It also comes from always being told that you can't do something and being like, 'F you. I can.'''