PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WM22 IOS basic question about downloading image from internet
WM22 IOS basic question about downloading image from internet
Iniciado por guest, 10,nov. 2017 02:12 - 5 respuestas
Publicado el 10,noviembre 2017 - 02:12
Hi all

I am starting with WM22 IOS development trying to download an image from internet and showing it in an image control.

In android works perfect, but when I try in an iphone 6 it does not show in the control

I did all I could find in the help without result, for exampler here

https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/15600-download-image-affichage-celle-ios/read.awp

When I compile the project in the Xcode I notice that it sends this message in the debugger window when I run it from the emulator


017-11-09 19:29:03.457373 Test_Windows[394:38817] Warning: Libinfo call to mDNSResponder on main thread


This is the code I am using in the WM project (Code that I found here in the forum)

HTTPRequest("

")

IF ErrorOccurred = False THEN
sResult is Buffer = HTTPGetResult(httpResult)
IF Position(sResult,"404") THEN
Info(HTMLToText(sResult))
ELSE
IF Length(sResult) > 0 THEN
IMG_Foto = sResult

Info("photo loaded")
END
END
END


The xcode version is 9 and in the WM22 project the minimun IOS version is 8 in the deployment target

I know this is a basic one but I have spend all day trying just to run this in an Iphone

I thought it could works as it does in android

Thank you very much for your advices

James
Publicado el 10,noviembre 2017 - 10:56
Hi

Does it work OK in the Simulators?
Publicado el 10,noviembre 2017 - 14:08
Hi Iso

No. It does not work in the simulator/ios device. Neither in the android simulator but when I install it in an android device it works.

Thank you

James
Publicado el 10,noviembre 2017 - 19:33
Just put the http of the image in the IMG_ control, I remember making it work that way
IMG_image = "

", if you need it for something more than just showing it and to be downloaded on the device, the process is different.
Publicado el 10,noviembre 2017 - 22:43
Thank Luis, for your answer,

I will try that way.

Thank you

James
Publicado el 10,noviembre 2017 - 23:28
No problem :) Hope it works!