I can't to publish my iOS app to AppStore.
Delphi 10.1.2 Berlin, iOS64, Win 8.1.
I received the next info from apple:
Thank you for your response.
Please ensure that your app is compatible with IPv6 networks.
The easiest way to test your app for IPv6 compatibility is to set up a local IPv6 network on your Mac. You can then connect to the network from your iOS devices to test IPv6 compatibility.
Please follow the step-by-step instructions provided in Supporting IPv6 DNS64/NAT64 Networks.
For additional information about supporting IPv6 networks, please review Supporting IPv6-only Networks.
It's connection code.
if (FSocket<>nil) then
begin
if not FSocket.Connected then
begin
SetState(mwtrstDisConnected);
FSocket.Free;
FSocket:=nil;
end
else
exit;
end;
FSocket:=TIdTCPClient.Create(nil);
FSocket.Host:=FHost;
FSocket.Port:=FPort;
//CheckCode
{$ifdef KBMMW_USING_INDY_9_OR_NEWER}
FSocket.BoundPortMin:=FMinClientPort;
FSocket.BoundPortMax:=FMaxClientPort;
{$endif}
{$IFDEF KBMMW_USING_INDY_10}
FSocket.ReadTimeout:=RequestTimeout*1000;
FSocket.ConnectTimeout:=ConnectTimeout*1000;
{$ENDIF}
{$IFDEF KBMMW_USING_INDY_8_00_23}
FSocket.Connect;
{$ELSE}
{$IFDEF KBMMW_USING_INDY_9}
FSocket.Connect(ConnectTimeout*1000);
{$ELSE}
FSocket.Connect;
{$ENDIF}
{$ENDIF}
DoConnected(Info);
In my opinion I have to insert the next code in //CheckCode place.
TIdStack.IncUsage;
IdURI := TIdURI.Create('195.34.x.x');
try
try
ss := GStack.ResolveHost(IdURI.Host, TIdIPVersion.Id_IPv6);
IdURI.IPVersion := TIdIPVersion.Id_IPv6;
except
IdURI.IPVersion := TIdIPVersion.Id_IPv4; // Just in case.
end;
//ShowMessage(ss);
finally
FreeAndNil(IdURI);
TIdStack.DecUsage;
end;
But this code (GStack.ResolveHost) doesn't work on iOS.
How to solve it?
Try something more like this instead:
Alternatively:
Note that this situation would become much simpler to handle once Indy implements the following feature, but that is a ways off, I think:
Support round-robin DNS (support connecting to IPv4/IPv6 hostnames)