Photochemistry of organometallic halide complexes: mechanisms for the formation of ionic products