Page 1 of 1

unidac 4.5.9 with delphi xe2 firemonkey on ios: connect with hostname not work

Posted: Tue 20 Nov 2012 22:02
by hauiclaudi
Problem: i make a Connection to a Host via hostname like testserver.xxxx.net. (not with ip Adress).
Under Windows delphixe2 firemonkey it Works correct. Now i send it via xcode and Compile it under a Mac or iPad. Error: Server not found.

If i send under Mac or iPad a ping testserver.xxxx.net the answer was the correct ip Adress. Also the Server was found with unidac 4.5.9 with the ipadress.

The Problem is that unidac not solve the hostname with the ipadress under a Mac or iPad. In the Windows Environment Works Fine. Can someone hell?

Re: unidac 4.5.9 with delphi xe2 firemonkey on ios: connect with hostname not work

Posted: Wed 21 Nov 2012 11:00
by AlexP
Hello,

This behavior is due to the fact that the gethostbyname function implemented in the FPC can not properly return a result (doesn't specify a host by name), at the moment you can only connect to the ip-address.

Re: unidac 4.5.9 with delphi xe2 firemonkey on ios: connect with hostname not work

Posted: Wed 21 Nov 2012 20:01
by hauiclaudi
Ups, that's not so good because it's a dynamic ipadress. Every day renew. Do you have a solution (some code)? Like set a ping to hostname and get then the ipadress?

Re: unidac 4.5.9 with delphi xe2 firemonkey on ios: connect with hostname not work

Posted: Fri 23 Nov 2012 15:06
by AlexP
hello,

We have already fixed connection by host name in iOS applications. This fix will be added to the next build that will be released in the beginning of the next month.