What is the domain name when the Hybrid app is running on the mobile
We are loading another website inside iFrame and for the cross domain communication we are using window.post message. However this is failing on the mobile device. Its working fine when we access the same app in browser of the laptop. When I put alert in the html snippet to get the our domain name, [ alert('domain-'+window.location.hostname);] this is coming as empty when we run the app. On laptop we get the domain name. The external website has white-listed our domain name, and if the domain name is empty, they will block us. How can we check, what is the domain name when the Hybrid app is running on the mobile.
Hi Romil, can you try updating the whitelist policy in the config.xml of your phonegap package. You probably don't have permission to open the external website from your mobile app. See this article for more info. Let me know your findings.