We have been building a iOS app that is about Client - Server App. We are using an SQL connection and WCF web services in the iOS app with Xamarin.
SQL Connection Code :
String ips = "10.0.0.1" ; //Example.
SqlConnection con = new SqlConnection(@"Data Source=" + ips + "; initial Catalog="x";user id =y;password = z;");
Apple decided to use only ipv6 on iOS9, so they published a document about IPv6 compatibility - IPv6 Documentation
Xamarin published a blog post about this too - Making Your iOS Apps IPv6 Ready
I read all those documents, but I could not manage to get rid of this "Store Rejection" problem.
I want to show you my last attemp : (ipv4 to ipv6)
string input = "10.0.0.1";
string ips = "";
IPAddress address;
if (IPAddress.TryParse(deviceIP, out address))
{
switch (address.AddressFamily)
{
case System.Net.Sockets.AddressFamily.InterNetwork:
// we have IPv4
ips = input;
break;
case System.Net.Sockets.AddressFamily.InterNetworkV6:
// we have IPv6
IPAddress ip = IPAddress.Parse(input).MapToIPv6();
ips = "[" + ip.ToString() + "]";
break;
default:
//
break;
}
}
I used the MapToIPv6()
function as described in the Xamarin blog post, but again my app was rejected by Apple.
Our app works well on IPv4 (Apple says this too). When Apple engineers turn off ipv4 and only use ipv6, our app could not reach the host.
Please help me to resolve this problem.
Platform : Visual Studio 2015 with Xamarin on Windows 10 + Mac OS X El-Capitan
Server : ON IPv4 Only.