Hi I am trying to use a Webview to load a local HTML file. I have found native webview doesn’t run in simulator that made it difficult for testing. Is there any other way to accomplish this task in simulator? [import]uid: 97897 topic_id: 20353 reply_id: 320353[/import]
The Mac simulator now can display webviews. If you have a Mac, you can use that.
[import]uid: 7563 topic_id: 20353 reply_id: 79525[/import]
It doesnt, i have a mac
Console:
WARNING: Web views are not supported in the simulator. Please build for device [import]uid: 113117 topic_id: 20353 reply_id: 111864[/import]
Are you using the latest build?
I no longer get “WARNING: Web views are not supported in the simulator. Please build for device”
instead I get:
6/15/12 1:43:54.017 PM [0x0-0x227e27c].com.anscamobile.Corona_Simulator: Runtime error: /Users/bgates/Desktop/MS_Office2013/main.lua:18: attempt to call field ‘newWebView’ (a nil value)
[import]uid: 74957 topic_id: 20353 reply_id: 111874[/import]
OK. So the APIs documentation was update June 14th 2012.
I don’t know when this was added “Native web views are available in the Mac Simulator, Xcode Simulator, and on device only.” - so Mac Simulator *should* work.
http://docs.coronalabs.com/api/library/native/newWebView.html
For me, even posting the example in the documentation I get an error with the latest build.
I recoded my app to make different calls to work around this, so for me its not a deal breaker. [import]uid: 74957 topic_id: 20353 reply_id: 111875[/import]
I think at the time of Eric’s post, he was referring to native.showWebPopup() and not native.newWebView().
native.showWebPopup() does work in the simulator.
native.newWebView() not so much.
I hope they address this soon since they really want us using newWebView(). I also hope they get .newWebView() on Android soon too.
[import]uid: 19626 topic_id: 20353 reply_id: 111881[/import]