Danny Boyle would like to reintroduce you to the Beatles. The iconic foursome certainly needs no introduction, but in his movie “Yesterday,” which debuts June 28, the director envisions a word where nobody has heard of John, Paul, George and Ringo.

That is, nobody besides Jack Malik. When the struggling songwriter, portrayed by newcomer Himesh Patel, discovers that after a freak accident, he’s the only person who remembers the Beatles’ songs, he’s faced with a big dilemma. As his popularity soars after taking credit for penning everything from “Hey Jude” to “Let It Be,” Jack is forced to grapple with the fact that he might lose Ellie (Lily James), his childhood best friend and strongest supporter.

Ahead of the film’s premiere, Variety spoke with Boyle about giving Patel his big break, directing chart-topper Ed Sheeran, who plays himself in the movie, and the reason he opted to leave “Bond 25” before cameras started rolling on 007’s next adventure.

How did you get involved in “Yesterday”?

I got the script from Richard Curtis. I worked with him on the opening ceremony of the London Olympics and we had kept in touch. I said sort of politely, “If you ever got anything remember to think of me.” He said, “Actually I just finished a script,” and he sent it to me. I read it and I thought, “I’ve got to do this.” I loved how light it was and the romantic in it intertwined with the love letter to the Beatles music.

Why did you cast Himesh Patel?

The biggest single factor in casting him was we had been seeing a lot of people who sang songs as part of the audition. I began to worry that the songs were a bit karaoke. They sounded like impersonations, and there’s nothing wrong with that, but it didn’t feel right to the film. Himesh Patel walked in and played “Yesterday” and “Back in the U.S.S.R.” and it was the purest moment. You get those occasionally in casting where you just go, “Oh my god, that’s him.” They felt like his songs, they didn’t feel like Paul McCartney’s songs. My job really was to protect that freshness that he has and that clarity.

Was there any pushback from the studio to cast a more well-known star?

I’m not complaining — the Beatles music is expensive — so I can understand the studio wanting someone ideally with a track record. But I must admit, when we were looking for people, there’s something really beneficial about this person being someone you don’t know, someone who is propelled to a more-popular-than-Jesus kind of stardom, that he would come out of nowhere. I had to persuade the studio to go with him. They were reluctant, but they understood when they saw his audition. I tried to be very responsible about casting. It’s a lot of money to use the Beatles songs and you have a responsibility to try and earn it back. Universal had success with Lily James in “Mama Mia 2,” so she gave the studio some reassurance that we weren’t making a private film about the Beatles. We wanted to share it with as many people as possible.

What was it like directing Ed Sheeran?

He is like you see it. He’s very straight and ordinary. I don’t know how he does it because I’ve seen him working, and obviously he’s a one-man machine extraordinaire, and yet he retains this simple humanity. He has such a good sense of humor about himself, he’s so self deprecating, and he teases us wrong about the fact that we did approach Chris Martin to play the part. We tried to disguise the fact that Ed was second on the list and he said, “I think you approached Harry Styles before then and I was third on the list.”

Is that true?

No, it would be a great story if we had. He was very great in the Chris Nolan film [“Dunkirk”], but we didn’t, no. We went straight from Chris Martin to Ed Sheeran. We’re very lucky. The first time I met [Ed], I don’t think he knew who I was. He knew I was the director but he hasn’t really done his research, I don’t think. And why should he? He doesn’t need to. But we had this very funny meal where someone mentioned “The Beach,” the film I made with Leonardo DiCaprio, and he’d heard of that. You know when you can tell someone is using their phone under the table? He was looking me up on IMDb or Google or something because I could see. But he was very sweet. He was ambitious as well to be a better actor. I said, I can help you just have to come to rehearsal. I think that’s a big help because often when you make celebrity appearances in cameos, they’re often off rhythm with the actors because they’re just dropping in on the day. He got to rehearse, got to know the other actors and he was lovely.

Why did it have to be the Beatles that everyone forgot?

Lots of people say, could you do it with Rolling Stone or the Beach Boys or Bob Dylan? Dylan and the Beatles, in a way, changed society in a fundamental way which makes them truly significant pop culture icons. I think the Beatles are the perfect choice for it because there are not many people who cross generations as successfully as they do. That recognition was crucial. They did change everything, certainly in Britain. America could argue Elvis began this process, but they said in this country, “We’re not going to do what you tell us to do. We’re going to talk about peace and love and be about pleasure of expression and be young.”

What was it like dramatizing songs people know so well?

We chose them very carefully so that we could get enough variety in the piece because obviously you’re just hearing one band throughout the film. But another great thing about the Beatles is they produce music of such incredible variety that you’re able to use fast and slow, there’s rock and roll, then ballads, reggae almost. We didn’t want to get too experimental with the songs either. We wanted them to remain quite faithful because Jack’s quest is to try to remember them, not to reinvent them.

Did you reach out to the living Beatles? 

Once we finished the film, I wrote to Paul and Ringo and the widows, Olivia, George’s widow, and Yoko, John’s widow, and sent them the film and said what an honor it was to be making it. We’re not looking for their recommendations, but as a courtesy we wanted to show what we had done. We got a wonderful letter from Ringo and a lovely one from Olivia as well. I don’t think Paul has seen the film yet but he saw the trailer and said, “Oh that seems to work.” We had to ask him about using “Yesterday” as the title of the film, and he was very funny about that because he said the original title of that song was “Scrambled Eggs.” “I got the song in a dream,” he said, “and when I went down for breakfast, I sang it about the breakfast menu.” He said, “Listen if your film is a mess, that might be a better title.” They’ve been lovely actually. The film is a massive tribute to them and their work.

Do you regret leaving Bond 25?

No, no. When you’re undertaking something like that, you have to all be on the same page. You have to all agree about what you’re doing. We started to disagree about what we were doing. I’m very tight with the writer, in this case it was a writer I worked with many times. I loved what we were doing, it just wasn’t, I know there are catch-all’s but in this case, we had very different visions of it. You’re far better to let them rethink rather than plow on because those films are so complicated to make. It’s a shame in one sense, and I would have loved to go from a Beatles film to a Bond film. It would make a very good headline. I wish Cary all the very best in taking over. I’m sure he’ll make a great job of it, he’s a terrific director.

Do you think Idris Elba should be Bond?

[Laughs] It’s funny. I love Idris, but I was watching the Claire Denis film the other day, “High Life” — it’s very good, I’d recommend, Robert Pattinson is very good in it — and I was watching it with a friend and I said to him, they should cast Robert Pattinson. He’s really matured in that film. And he said to me, “They just cast him as Batman.” So anyway, I don’t know. There’s enough great minds thinking about that.