added support for ios with post message