Im having problems loading a HTML file located in documents folder of the iOS app.
I works fine in the debugger.
It works fine on iPad Pro (iOS 12 & iOS 13).
It doesnt work on iPhone SE, iOS 12, but I dont find any errors, the html page is just empty.
Html file is loaded with LoadURL(htmlFile.URLPath)
Xojo 2019r2, macOS Mojave.
As found in the docs: Loading HTML From Documents Folder
I tried this method:
[code]Declare Function NSClassFromString Lib “Foundation.framework” (clsName As CFStringRef) As ptr
Declare Function URLWithString Lib “Foundation.framework” Selector “URLWithString:” ( id As Ptr, URLString As CFStringRef ) As Ptr
Declare Sub loadFileURL Lib “UIKit.framework” Selector “loadFileURL:allowingReadAccessToURL:” (obj As Ptr, url As Ptr, readAccessURL As Ptr)
// htmlFile is a Xojo.IO.FolderItem from Xojo.IO.SpecialFolder.Documents
Var nsURL As Ptr = URLWithString(NSClassFromString(“NSURL”), htmlFile.URLPath)
Var readURL As Ptr = URLWithString(NSClassFromString(“NSURL”), htmlFile.parent.URLPath)
loadFileURL(htmlPresentation.Handle, nsURL, readURL)[/code]
Doesnt compile because « item doesnt exist » for htmlPresentation.Handle.
Any idea about htmlPresentation ?? What should it be ?
Thanks !