midi in + audio out on iPhone 7?
Are you using a USB midi keyboard and the lightning camera adapter for MIDI? If so, this probably won't work for you...  However, if you're just using standard MIDI ports, you might be able to use this, although no guarantees, as I haven't tested it.  It has headphone outputs and MIDI inputs, so in theory you should be able to do what you need.

EDIT: Just thought of this: You might be able to do this with a lightning to USB adapter, a powered USB hub, a class compliant USB MIDI interface, and a class compliant USB to 3.5mm audio interface.  Theoretically this should work since all these devices are supported, however this hasn't been tested by me.