iOS Question LoadUrl problem

Claude Brun

Active Member
Licensed User
Longtime User
hi,
I built a web server with an ESP32. On my local network this server has the IP address 192.168.1.80
I use noip for dynamic DNS (test-b4i.ddns.net)
on a browser I see my server with its local IP address (192.168.1.80) and with its DNS name (test-b4i.ddns.net)
with b4i app, I see the server with its IP address, but I don't see it with its DNS name

thank
 

Claude Brun

Active Member
Licensed User
Longtime User
no it doesn't work with https too
I did a lot of testing and all sites are working except my personal sites using noip ddns
sites that are accessed through a browser
 
Upvote 0

Claude Brun

Active Member
Licensed User
Longtime User
i didn't see any ddns service on ngrok, just tunnels.
I tried other ddns services and it does not work (DuckDns, Dynv6)
 
Upvote 0

Claude Brun

Active Member
Licensed User
Longtime User
no one has an idea for my problem.

error when loadurl on a webview for web pages with a ddns service like NOIP (or similar)
 
Upvote 0

Claude Brun

Active Member
Licensed User
Longtime User
Hi,
you understood correctly for points 1 and 2
for point 3, I did not try (I did not know)
I’ll try to see if it works and if it fits my need

thank
 
Upvote 0

Claude Brun

Active Member
Licensed User
Longtime User
After a lot of research, I don't understand how to use the iHttputil2 library and I couldn't find any documentation
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
1. Try set in Main module
B4X:
#ATSEnabled: False

2. Check iHttpUtils2 in Library Manager and try with this code:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    Try
        Dim job As HttpJob
        job.Initialize("", Me)
        job.Download("http://test-b4i.ddns.net")
        Wait For (job) JobDone (job As HttpJob)
        If job.Success Then
            Dim Data As String = job.GetString
            WebView1.LoadHtml(Data)
        Else
            Dim Error As String = job.ErrorMessage
            WebView1.LoadHtml(Error)
        End If
    Catch
        Log(LastException.Message)
    End Try
    job.Release
End Sub

Sub WebView1_PageFinished (Success As Boolean, Url As String)
    Log($"${Url} : ${Success}"$)
End Sub
 
Upvote 0

Claude Brun

Active Member
Licensed User
Longtime User
Thanks, with this code my website is displayed in the WebView
2 problems remain. CSS and javascript not working in webview. (it works on a browser)
je vais essayer de modifier mon html pour corriger cela.
 
Upvote 0

Claude Brun

Active Member
Licensed User
Longtime User
for the css it worked immediately with the file under dirasset, but not for the javascripts
but by modifying my scripts I managed to make it work
thank you VERY VERY MUCH for your help
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…