D db0070 Active Member Licensed User Longtime User Jan 4, 2020 #1 My app has stopped working since ios 13.3 upgrade. It is now failing to display the page in Webview. This is my code :- Code: Copy Dim xui As XUI File.Copy(File.DirAssets, la(Index,0) & ".pdf", File.DirDocuments, "page.pdf") WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, "page.pdf")) There are no error messages when I run in debug mode. Nothing happens when the code is run. Contacted Apple, and their reply: - "if it is only failing to work on the latest OS. Then it may need to be updated to correct any incompatibles with the Latest iOS versions" I have checked, the app works on older IOS versions.
My app has stopped working since ios 13.3 upgrade. It is now failing to display the page in Webview. This is my code :- Code: Copy Dim xui As XUI File.Copy(File.DirAssets, la(Index,0) & ".pdf", File.DirDocuments, "page.pdf") WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, "page.pdf")) There are no error messages when I run in debug mode. Nothing happens when the code is run. Contacted Apple, and their reply: - "if it is only failing to work on the latest OS. Then it may need to be updated to correct any incompatibles with the Latest iOS versions" I have checked, the app works on older IOS versions.
mrossen Active Member Licensed User Longtime User Jan 4, 2020 #2 Hi, I am doing this. It works in iOS 13.3 B4X: Copy Dim filename as string = "page.pdf" If File.Exists(File.DirAssets, filename) Then WKWebViewHelp.LoadHtml(File.ReadString(File.DirAssets, filename)) end if Mogens Last edited: Jan 4, 2020 Upvote 0
Hi, I am doing this. It works in iOS 13.3 B4X: Copy Dim filename as string = "page.pdf" If File.Exists(File.DirAssets, filename) Then WKWebViewHelp.LoadHtml(File.ReadString(File.DirAssets, filename)) end if Mogens
D db0070 Active Member Licensed User Longtime User Jan 4, 2020 #3 I changed my code to Code: Copy Dim fileName As String = la(Index,0) & ".pdf" If File.Exists(File.DirAssets, fileName) Then WKWebView1.LoadHtml(File.ReadString(File.DirAssets, fileName)) End If and I am now getting a 'Error reading file. Incorrect encoding' on this line WKWebView1.LoadHtml(File.ReadString(File.DirAssets, fileName)) Upvote 0
I changed my code to Code: Copy Dim fileName As String = la(Index,0) & ".pdf" If File.Exists(File.DirAssets, fileName) Then WKWebView1.LoadHtml(File.ReadString(File.DirAssets, fileName)) End If and I am now getting a 'Error reading file. Incorrect encoding' on this line WKWebView1.LoadHtml(File.ReadString(File.DirAssets, fileName))
D db0070 Active Member Licensed User Longtime User Jan 4, 2020 #4 Ah, wait, my file is not image, it is pdf! That is why I was using WKWebView1.LoadUrl So the problem is still there - I cannot display pdf files in iOS 13.3 Upvote 0
Ah, wait, my file is not image, it is pdf! That is why I was using WKWebView1.LoadUrl So the problem is still there - I cannot display pdf files in iOS 13.3
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2020 #5 Check the inline documentation. WKWebView.LoadURL will not work with File.DirAssets. You need to copy the file to File.DirDocuments and load it from there. Upvote 0
Check the inline documentation. WKWebView.LoadURL will not work with File.DirAssets. You need to copy the file to File.DirDocuments and load it from there.
D db0070 Active Member Licensed User Longtime User Jan 5, 2020 #6 That is what I am doing, and it’s stopped working in ios13.3:- Code: Copy Dim xui As XUI File.Copy(File.DirAssets, la(Index,0) & ".pdf", File.DirDocuments, "page.pdf") WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, "page.pdf")) Upvote 0
That is what I am doing, and it’s stopped working in ios13.3:- Code: Copy Dim xui As XUI File.Copy(File.DirAssets, la(Index,0) & ".pdf", File.DirDocuments, "page.pdf") WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, "page.pdf"))
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2020 #7 Just tested it with a device running iOS 13.3 and it works fine: Code: Copy File.Copy(File.DirAssets, "1.pdf", File.DirDocuments, "1.pdf") WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, "1.pdf")) Sub WKWebView1_PageFinished (Success As Boolean, Url As String) Log(Success) Log(Url) End Sub Upvote 0
Just tested it with a device running iOS 13.3 and it works fine: Code: Copy File.Copy(File.DirAssets, "1.pdf", File.DirDocuments, "1.pdf") WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, "1.pdf")) Sub WKWebView1_PageFinished (Success As Boolean, Url As String) Log(Success) Log(Url) End Sub
D db0070 Active Member Licensed User Longtime User Jan 5, 2020 #8 When I run it on my iPhone 6S, the Log(Success) is false and Log(Url) is empty string. Other people have reported that since the iOS 13.3 upgrade the app has stopped working. This is the app - which was updated two months ago, and was working until the update of iOS a few days ago: https://apps.apple.com/gb/app/tahsinul-quran/id1454041122 I running xCustomListView Version 1.73 and iXUI version 1.9 Last edited: Jan 5, 2020 Upvote 0
When I run it on my iPhone 6S, the Log(Success) is false and Log(Url) is empty string. Other people have reported that since the iOS 13.3 upgrade the app has stopped working. This is the app - which was updated two months ago, and was working until the update of iOS a few days ago: https://apps.apple.com/gb/app/tahsinul-quran/id1454041122 I running xCustomListView Version 1.73 and iXUI version 1.9
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2020 #9 Test it with a new project with only the pdf file and WKWebView. Does it work? Upvote 0
D db0070 Active Member Licensed User Longtime User Jan 5, 2020 #10 Yes, that works. I will do further debugging. In my project the WKWebView is added to a customlistivew - maybe that is the problem Upvote 0
Yes, that works. I will do further debugging. In my project the WKWebView is added to a customlistivew - maybe that is the problem
D db0070 Active Member Licensed User Longtime User Jan 5, 2020 #11 I found the problem but I can't understand why. In Page_Resize I had this line Code: Copy CustomListView1_ItemClick(currentLesson,"") CustomListView item click basically has this code: - Code: Copy Dim xui As XUI File.Copy(File.DirAssets, la(Index,0) & ".pdf", File.DirDocuments, fileName) If File.Exists(File.dirdocuments, fileName) Then WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, fileName)) End If By disabling that call to CustomListView_ItemClick in Page_Resize, the problem is solved. But why in IOS13.3 only? Upvote 0
I found the problem but I can't understand why. In Page_Resize I had this line Code: Copy CustomListView1_ItemClick(currentLesson,"") CustomListView item click basically has this code: - Code: Copy Dim xui As XUI File.Copy(File.DirAssets, la(Index,0) & ".pdf", File.DirDocuments, fileName) If File.Exists(File.dirdocuments, fileName) Then WKWebView1.LoadUrl(xui.FileUri(File.DirDocuments, fileName)) End If By disabling that call to CustomListView_ItemClick in Page_Resize, the problem is solved. But why in IOS13.3 only?
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2020 #12 It is probably not a good idea to call it from Page_Resize as it can be raised multiple times. Add everything with the designer, anchored correctly, and you will not need to worry about such issues. Upvote 0
It is probably not a good idea to call it from Page_Resize as it can be raised multiple times. Add everything with the designer, anchored correctly, and you will not need to worry about such issues.