Turns out there was a new line character at the beginning which is apparently ignored by android but not ios.