In a video originally provided to BuzzFeed News, and now available for download on iTunes [Direct Link], Levitan explains that all of the iPhones were kept in holsters held by cameramen. To avoid making the shot look like it was being filmed by a floating device, the actors were told to hold their arm near the cameramen's arm.
Initially, Levitan and the crew wanted the actors to hold the phone throughout film, but they found it wasn't as east to control and that actors would misplace the devices as well as shoot off-set.
The episode took over three months to complete, with a lot of time dedicated to post production as the special effects team had to rebuild OS X Yosemite from the ground up, mimicking its animations and art style while also taking artistic license to make certain things better suited for the story they wanted to tell.
While the episode's format isn't the same as the standard "Modern Family" format, Levitan says there have been other instances during the show's six year run where they've used iPhones to shoot certain scenes. For instance, instead of staging a basketball game for a scene where a character dresses as a mascot, Levitan shot his son's basketball game on his iPhone and used special effects to splice the character into that basketball game.
The episode, which is called "Connection Lost" airs Wednesday, February 25 on ABC.