Please bring functionality of ARTA:http://www.artalabs.hr/
on IOS with external sound card like RME Babyface. Please add script that will automatically measure impedance and SPL with distortion (Farina et al) by using sine sweep.
Also take a look on old Bruel Kjaer 2012 audio analyzer - it has a nice IM and harmonic distortion measurement capabilities with two generators. For a limited hardware - superb design. Something for inspiration.