Retina Macbook Pro 15" 2015 vs iMAC 21" 3.1 GHZ i7 256 SSD I need to purchase a new Mac computer to start developing iOS apps using Xcode and Swift. It's my first time Mac ever so I'm confused. I know its kinda of portability choice between the 2 models but It's not an issue with me as I'm not travelling a lot nor develop outside home. So my main concern would be the possibility of coding as well as option to make me comfortable with coding. (screen size factor, Retina display, ...etc).

Any advice would be much appreciated!
I find that the flexibility of being able to move around in the house makes it worth getting a laptop. Mobile freedom is really addictive once you get used to it. The only issue is that, for coding, having a ton of screen real-estate is advantageous. Obviously the iMac has the MacBook Pro beat in that regard, but you could get a cheap external display for that purpose. It depends on which setup you'd find yourself most comfortable with. Sometimes, if I'm just writing a Python script with no UI, I can easily do it with one monitor, and so then the mobile freedom offered to me by my laptop is incredibly nice. The other times, I have a cheap external monitor for my UI, and my MacBook Pro's monitor for the code, since it has such a high res display to make all the text crystal clear. The UI monitor doesn't have to be terribly high-res, just large. It works well for me.