Hi Rob,
Any idea why my native.newWebView on my iPhone 6 Plus is displaying nothing but a window area of WHITE?
The same code works fine in simulator, on my Android and iPad2!!!
I’ve tried variations of my URL and finally figured that if http://www.google.com would not come up, something else is wrong.
The window area displays properly - the problem is that nothing comes up on my iPhone; but is fine on Android and iPad2.
Here is the code:
NOTE: The “V.” prefix represents global variables.
bringUpBrowser("http://www.google.com")
function bringUpBrowser(url)
local function webListener( event )
local shouldLoad = true
local url = event.url
if 1 == string.find( url, “corona:close” ) then
– Close the web popup
shouldLoad = false
end
if event.errorCode then
– Error loading page
print( "Error: " … tostring( event.errorMessage ) )
shouldLoad = false
end
return shouldLoad
end
– V.fieldFactor is 1 for Android and iPads or the coefficient calculation for iPhones (described on another post)
– V.W = screen width, V.H = screen height
V.webView = native.newWebView(0,0,V.W*V.fieldFactor,V.H*.9*V.fieldFactor) --90% of the vertical height only, so the App can have a CLOSE button
V.webView:request(url)
V.webView:addEventListener(“urlRequest”,webListener)
end