Brought web app communication more in line with iOS SDK, fixes #47