XE10 developed app for Apple IPV6 shelves requirements (delphiteacher)

Source: Internet
Author: User

1. The server must use a domain name. Cannot use IP address
2.Indy words, domain name plus []
3.DataSnap words, params.values[' communicationipversion ']: = ' Ip_ipv6 ';
4. The current network environment judgment, the following code:


{$IFDEF IOS}
Uses
Strutils,
Posix.netdb,
idstackconsts;
{$ENDIF}



function Issupportipv6host_ios (const host:string): Boolean;
{$IFDEF IOS}
Var
Aphostent:phostent;
{$ENDIF}
Begin
Result:=false;
{$IFDEF IOS}
Apple only requires IOS9 above the system to run the app support IPV6
iOS version to be greater than 9
If Tosversion.check (9) Then
Begin
Try
FMX. TYPES.LOG.D (' Orangeui issupportipv6host_ios ' +host);
If the current environment is ipv4,aphostent to nil
Aphostent:=gethostbyname2 (Marshaledastring (TEncoding.UTF8.GetBytes (Host)), ID_PF_INET6);
Result:= (Aphostent<>nil);
FMX. TYPES.LOG.D (' Orangeui issupportipv6host_ios IsIPV6 ' +booltostr (Result));
Except
But when the IPV4 switch to IPV6, the program does not exit, will be error
End
End
{$ENDIF}
End

Http://blog.sina.com.cn/s/blog_44fa172f0102w8sj.html

XE10 developed app for Apple IPV6 shelves requirements (delphiteacher)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.