not great code for handling ios chat interoperability