Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 2 Monaten, 1 Woche
Letzter Beitrag:
vor 2 Monaten, 1 Woche
Beteiligte Autoren:
James Smiths, Luis Antonio Gutiérrez Flores, iso

WM22 IOS basic question about downloading image from internet

Startbeitrag von James Smiths am 10.11.2017 01: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("https://example.com/779.jpg";)

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

Antworten:

Hi

Does it work OK in the Simulators?

von iso - am 10.11.2017 09:56
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

von James Smiths - am 10.11.2017 13:08
Just put the http of the image in the IMG_ control, I remember making it work that way
IMG_image = "https://example.com/779.jpg";, if you need it for something more than just showing it and to be downloaded on the device, the process is different.

von Luis Antonio Gutiérrez Flores - am 10.11.2017 18:33
Thank Luis, for your answer,

I will try that way.

Thank you

James

von James Smiths - am 10.11.2017 21:43
No problem :) Hope it works!

von Luis Antonio Gutiérrez Flores - am 10.11.2017 22:28
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.