The PS4 and XBox One also have four times as much RAM as the iPhone 7. In fact I was kind of shocked when they announced it would only have 2GB, considering you can get a Nexus or OnePlus with 6GB this year.
I know I was being pedantic, but that is how misconceptions get spread.
Considering my iPad Air has only 1gb of RAM an performs acceptably, despite having to render at 2560x1600 - it shows that iOS is surprisingly light on ram usage. 2gb will do well for the phone. iOS is also very quick to relaunch apps and the iPhone has very fast flash memory and fast CPU to do that.
I used my old HTC Desire HD for 5 years, it became ram strapped lately with its 768mb