Compare the physical specs... But really, the one that produces better results is going to depend on the skill of the user... The Internet is replete with examples skilled photographers getting stunning pictures with the iPhone4 camera... And I've seen pictures taken on DSLRs costing thousands of dollars that are horrible because the user didn't/doesn't know what they're doing.
I don't know which is better all I can tell you is that the camera worked and continues to work well on all of the iPhones I've owned over the years, and the one on my iPhone 6 Plus is, in my opinion, the best thus far. In regard to Sony, I'm sure you've reviewed numerous video and article reviews in regard to its camera. All you have to do is decide for "yourself".