Should I use webPopup or webView?

I need to have some built-in browser showing web contents in my app, I found there are two methods to do so, 

(1) webPopup

(2) webView

Which one should I choose?

From the documentation, it looks like webView is more flexible and better than webPopup… in what condition would I ever consider using webPopup?

Hi @joe16,

“webPopup” is the older API. “webView” is the better option and I suggest that you use that one.

Best regards,

Brent Sorrentino

Thanks, Brent. 

About “webView”, the document says “Native web views are available on iOS devices and Android devices only. This feature is not supported by the Corona Simulator.”

Does it mean I have to test webView on real devices and the Simulator doesn’t show any webView?

Hi Joe,

Yeah, it means the Corona simulator won’t display webViews or web Pop ups.

You can still use them in the Xcode simulator though!

Hope that helps! :slight_smile:

But it’s weird, when I call native.newWebView()

I can see the web view in my Corona simulator

How come?!

I think the documentation is wrong on that point.  webViews don’t display in the Windows simulator, but they do display on the Mac simulator.  So if you’re using a Mac, that’s why you can see them.

  • Andrew

I use mac, and I can’t see them…

(I’m using the latest build)

Hmm, interesting.  Which Mac OS version are you running?  I definitely do see webViews in the Corona simulator on my Mac, running 10.8.4.  That said, they don’t always render exactly the same as they do on the device, so I end up focusing on the device anyway.

  • Andrew

My Mac OS is also 10.8.4

I can see the webview showing the webpages I specify

I do believe it might have slight difference in real devices, but I just wonder why the document says it’s not supported in Simulator, what I should be wary about?

The document says the “webPopup” is available in Mac Simulator while “webView” is not supported in Simulator.

So it’s quite confusing!

I will assume “webView” is also available in Mac Simulator then

Thanks.

Hi all,

The documentation was a bit off on this; thanks for pointing it out. Native webView does work in the Mac Corona Simulator. I’ll be making this change to the documentation shortly.

Brent

Hi @joe16,

“webPopup” is the older API. “webView” is the better option and I suggest that you use that one.

Best regards,

Brent Sorrentino

Thanks, Brent. 

About “webView”, the document says “Native web views are available on iOS devices and Android devices only. This feature is not supported by the Corona Simulator.”

Does it mean I have to test webView on real devices and the Simulator doesn’t show any webView?

Hi Joe,

Yeah, it means the Corona simulator won’t display webViews or web Pop ups.

You can still use them in the Xcode simulator though!

Hope that helps! :slight_smile:

But it’s weird, when I call native.newWebView()

I can see the web view in my Corona simulator

How come?!

I think the documentation is wrong on that point.  webViews don’t display in the Windows simulator, but they do display on the Mac simulator.  So if you’re using a Mac, that’s why you can see them.

  • Andrew

I use mac, and I can’t see them…

(I’m using the latest build)

Hmm, interesting.  Which Mac OS version are you running?  I definitely do see webViews in the Corona simulator on my Mac, running 10.8.4.  That said, they don’t always render exactly the same as they do on the device, so I end up focusing on the device anyway.

  • Andrew

My Mac OS is also 10.8.4

I can see the webview showing the webpages I specify

I do believe it might have slight difference in real devices, but I just wonder why the document says it’s not supported in Simulator, what I should be wary about?

The document says the “webPopup” is available in Mac Simulator while “webView” is not supported in Simulator.

So it’s quite confusing!

I will assume “webView” is also available in Mac Simulator then

Thanks.