iOS Question Page not loading in WebView

abhishek007p

Active Member
Licensed User
Hi,

i have a simple app which is uses webview to display a html page, in Debug build the html page appears fine but in release build, the webview is blank (white).

i have already
-cleaned up safari history in case that was causing problem.
-placed a test button to reload the page instead of at app start.
-checked if file exists or not, and it does exists.

here is the code i am using to load the html page.

B4X:
WebView1.LoadUrl("file://" & File.Combine(File.DirAssets,"1.htm"))

placed under
Sub Application_Start
 
Last edited:

omidaghakhani1368

Well-Known Member
Licensed User
Hi
Use LoadHtml
example :
B4X:
Webview1.LoadHtml(File.LoadString(File.DirAsset,"1.html"))
 

abhishek007p

Active Member
Licensed User
my html page has lots of non-english Unicode character and the take time to render if loading by string, but not in case of loading the html by file in debug mode. i am not referencing non-local files, all the images and css are added to the files tab.

some other user suggested to copy the html to temp folder and then load it, is it fine to do it?

Make sure that your string doesn't reference any non-local resources.
My page do have two external links, one opens a link and other link is a mailto to send me a email. is it fine?

Can you post a Obj-C code to load a html file in webview?
 
Last edited:
Top