Question
IP Australia
AU
Last activity: 12 Aug 2017 14:11 EDT
Can we use iframe in Hybrid mobile app?
Hi,
I have a requirement to display iframe in Hybrid mobile app, can we do that? or is there any restriction from pega.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
IP Australia
AU
Hi All,
We successfully loaded iframe in mobile, hosted the third party application on our App server and that worked. to load the content, we called our activity in ifame non auto generated section itself.
Pegasystems Inc.
IN
Hi Mohammad,
IFRAME becomes legacy from Pega 7.x onwards. It is not recommended to use IFRAMES in Mobile app not only with respective perspective of Pega but general mobile applications.
Hope this helps, Please feel free to reply your thoughts on this.
Thank you,
IP Australia
AU
Thank you for putting your thoughts,
Did pega provided any alternate for this from 7.x onwards? basically we are receiving a iframe which will display maps (Not Google) and we need to display that in our Mobile app.
Thanks,
Mohammad
Pegasystems Inc.
US
Mohammad,
What mapping provider are you looking to support? We have customers using ESRI with mobile. Can you create a custom control or section that does not require an iframe? If not, launching a browser might be your best bet... https://community.pega.com/sites/default/files/mobileclient/7224/api/client_api/book_container_api_browser.html
- James
IP Australia
AU
James,
Thanks for the reply, we are using maps provided by ESRI only. if I am not using iframe tag in section, how can I launch the map page. can you please provide any idea on this. we need to get the cases details and form a JSON message and send to ESRI maps to display the location.
Thank you.
-
Grant Thompson
Pegasystems Inc.
IN
Hi Mohammad,
I don't understand the need for displaying or rendering an iframe tag inside your non-auto section.
If you are using ESRI custom control, I believe you can include it in that directly in your non-auto code of the section rather than creating seperate <iframe>.
IP Australia
AU
Hi,
I am not using any custom control. we just got the ESRI maps application URL to display the map in Pega.
Pegasystems Inc.
IN
Hi Mohammad,
Thanks for posting query in PDN.
In case if iframe src is set to third party domain and that domain restricts the url from embedding in the iframe, then the below error is seen irrespective to mobile and web App.
e.g :<iframe src="http://www.google.com"></iframe>
The error is thrown in the console “Refused to display 'https://www.google.co.in/?gfe_rd=cr&ei=blz_WMWsEeLI8Afn8JjwBw' in a frame because it set 'X-Frame-Options' to 'sameorigin'.”
Because google doesn’t allow loading of their url in an iframe outside of their domain. This restriction is set by the google in response header 'X-Frame-Options' to 'SAMEORIGIN'. Then the browser will not render that url in iframe and throws that error in the console. This is the browser behavior and same can be observed in a sample html with iframe. Few browsers like IE don't log these kind of errors in console.
Thanks & Regards,
Durga
IP Australia
AU
Durga,
Thanks for your reply. I am not getting any error in logs or on screen. I am able to load the iframe in desktop without any issues. But, the only issue is with Mobile and it is showing blank page.
Thank you,
Mohammad Gouse
Accepted Solution
IP Australia
AU
Hi All,
We successfully loaded iframe in mobile, hosted the third party application on our App server and that worked. to load the content, we called our activity in ifame non auto generated section itself.