For 4K HEVC HDR 10-bit video playback, I have no problems on my 1.2 GHz 2017 Core m3-7Y32, so obviously, a 3.4 GHz i5-7400 will be fine.
For Xcode, I'm no expert, but it would depend upon how important compile times are for you. For example, in Cinebench R15 rendering, the 3.8 GHz i5-7600K is roughly 15% faster than the 3.4 GHz i5-7500. For most usage the difference would be negligible, but for some usage the difference might be important to you.
The GPU speed is pretty much irrelevant for the usage you've listed.