Iframe vs InAppBrowser

Ionic is most beautiful and popular cross-platform mobile development technology. Sometimes we need to show other webpages in our app. For that, we have 2 options:

  • iframe - feels like part of app so works beautifully for user experience. But we don’t have any support for iframe from ionic team, also @mhartington mentions it will get our app rejected in apple store.

  • InAppBrowser - Ionic uses cordova inappbrowser which does the basic work. The problem is Ionic 2 is so advanced now that default styles feels native whether it’s iOS, Android or Windows platform. Using cordova inappbrowser lacks theme and has very basic UI as compare to Ionic, results in bad user experience.

Anyone using https://github.com/initialxy/cordova-plugin-themeablebrowser in Ionic 2, any opinions?

With millions of developers using Ionic, why don’t we have awesome InAppBrowser?

2 Likes

I’m interested in this topic as well.

I think iframe works just fine on Cordova.
Do all apps using iframe get rejected from apple app store?

Most of all, yes. As they don’t comply with App Store Review Guidelines

1 Like

Ok, in my example, 99% of app is Cordova, HTML5, CSS3, TypeScript, Angular.
But there are two iframes which link to a different web app.

Would they still reject this app despite of app being useful on its own?

It should not but if you display a full website or content that may look like a website it will be rejected.

1 Like

Yeah… then it will be fine in my case.
I never do that so I won’t have to worry about this.

But I’m still curious if in-app-browser performs better than iframe on Cordova?
In terms of performance and compatibility, which one’s better?
or is there a better solution?

Hi Josem,

I am able to submit my app(loading website in Iframe) in Apple’s App Store .

They had approved & it’s available in App Store also.

Hi @KPH
I wasn’t able to make what you describe work on an iPhone.
Would you mind posting how you did it, please?
Thanks!
Gustavo.

Hi Gusgonnet,

We had an HTML5 responsive website.Customer requirement was to create the same in Mobile.

We decided that, let’s load the website in iframe in IONIC app.

Initially we faced issue while loading the website in iframe for iOS devices. Later it got worked for us.

1 Like