Hello everyone,
our App got rejected by Apple today because it is not working with ipv6. After a bit of research i have the feeling that it comes down to WinInetHttpClientChannel.
We have the following setup:
Xamarin iOS project. The iOS project references a project where we have all references to RemObjects libraries etc. To reproduce the problem be sure that the device is in an ipv6 environment. (Supporting IPv6 DNS64/NAT64 Networks → Test for IPv6 DNS64/NAT64 Compatibility Regularly)
Inside we do the following:
private ClientChannel CreateChannel(Uri uri)
{
var channel = new WinInetHttpClientChannel();
channel.TargetUrl = uri.ToString();
if (CompatibilitySettings.RemObjectsIncreaseTimeout)
channel.Timeout = 120;
return channel;
}
If i pass “http://192.68.xxx.xxx:80/BIN” as uri i get the following on the first usage of the channel:
SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000cb] in /Users/builder/data/lanes/3859/b638977c/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net.Sockets/Socket.cs:1313
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x001c2] in /Users/builder/data/lanes/3859/b638977c/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/WebConnection.cs:195
WebException: Error: ConnectFailure (Network is unreachable)
at RemObjects.SDK.WinInetHttpClientChannel+AsyncState.get_Message () [0x0004e] in <43f87e2f3b25489f93e661a67852e8d3>:0
at RemObjects.DataAbstract.Server.SimpleLoginService_AsyncProxy.EndLogin (System.IAsyncResult __AsyncResult, RemObjects.DataAbstract.Server.UserInfo& aUserInfo) [0x00000] in <903f7027d1af4524a3fb11501a3f4c6c>:0
at RemObjectsServices.LoginService.m__0 (System.IAsyncResult r) [0x00005] in /Users/RemObjectsServices/LoginService.cs:32
at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func
2[T,TResult] endFunction, System.Action1[T] endAction, System.Threading.Tasks.Task
1[TResult] promise, System.Boolean requiresSynchronization) [0x00014] in :0
If i pass a normal URL like “https://mobile.xxx.com:1625/BIN” it works. I also tried to transform my ip4 address to ipv6 but same result.
Can you tell me how this should work? Does the flag in the iOS build settings of the Xamarin project influence that? (HttpClient implementation)?
Any help would be appreciated. I am completely stuck here.
Thank you!