TTMSFMXHTMLText & a href="file:"

I'm using the <A href="file:..> " tag in TTMSFMXHTMLTex but the file does not open when the application runs on iOS.

It only works on Windows and MacOS.

Here is the procedure to create an application to test this:

1) Create a new blank multidevice application
2) Put one TTMSFMXHTMLText to form (set align = Client).
3) Add System.IOUtils to uses.
4) Add this code in OnCreate of form:
procedure TForm1.FormCreate(Sender: TObject);
var
    wHTML: TStringList;
    wFile: String;
begin
    wFile:=TPath.Combine(TPath.GetDocumentsPath, 'tst.html');
    wHTML:=TStringList.Create;
    wHTML.Add('<!DOCTYPE html>');
    wHTML.Add('<html>');
    wHTML.Add('<body>');
    wHTML.Add('Success: This is the <B>file</b>');
    wHTML.Add('</body>');
    wHTML.Add('</html>');
    wHTML.SaveToFile(wFile);
    if FileExists(wFile) then
       TMSFMXHTMLText1.Text:='<a href="file:'+wFile+'"> click here to open file</a><br><br>'+
                             'File name = "'+wFile+'"'
    Else
       TMSFMXHTMLText1.Text:='ERROR: the file was not created';
end;

5) Run application on iOS and touch the link (I tested on iPad with iOS 12.2).

I'm using: 
Delphi Rio 10.3 Update 1
Last version of TTMSFMXHTMLTex (TMS FMX UI Pack 3.7.2.3)

Is this a bug or does the "file:" really not work on iOS?

Hi,


The "File://" reference only works on desktop operating systems. Mobile operating systems do not support the File:// reference because of security issues. Opening files can be handled separately, via the OnAnchorClick and the method TTMSFMXUtils.OpenFile

Okay, I'll do it this way.


Thank you.