iOS Question Open htm file with documentinteraction problem

mrossen

Active Member
Licensed User
Longtime User
Hi,

I am trying to open a html file.

iOS are opening the box where I can choose witch app I will use. It only show Chrome as browser, not Safari. When i choose Chrome it try to open the file but get a error on the file.

It dont know if there is something wrong with the file or it can not find it.

I have made a examble and attached it. The code in my app have worked, but I think after some ios update it does not anymore.

Mogens
 

Attachments

  • html.zip
    3 KB · Views: 165

kisoft

Well-Known Member
Licensed User
Longtime User
Hi
Try to open it in webview.
B4X:
 WebView1.LoadHtml(File.ReadString(File.DirAssets,myfile.html))
 
Upvote 0

mrossen

Active Member
Licensed User
Longtime User
Hi

Thank you for the tip. I have changed encoding on html file to utf-8, then I can load to the webview.

But the problem is still the same. I can not open in a browser.

Mogens
 

Attachments

  • html.zip
    3.1 KB · Views: 173
Upvote 0

mrossen

Active Member
Licensed User
Longtime User
I need to show a html file.

I try to open a html file, wants a prompt for apps that can open it, and then open the html file

I have been looking into SafariController, but it seems only to open a URL, not a local file?

Mogens
 
Upvote 0
Top