How do I get a relay to recognize when a TRRS jack is plugged into my iphone?
A lot of 3.5mm jacks (headphone jacks) have contacts that are opened or closed when you insert the jack.  So you could figure out a circuit from that, you might even be able to find one that will let you do it without the relay.   Take a look at this one with a double internal switch.



See how in this image you could connect 3 and 2 to your head unit, and 5 and 4 to your changer.  Then when you plug in your iphone 3.5mm cable it'll break contact with 5 and 4 and instead connect the iphone through 3 and 2. (pin one is your gnd).