tcp connection works only over wi-fi. not on cellular data

hi. i have an app that is able to make the tcp connection to server only if my mobile on wifi network. it does not connect when wi-fi is turned off. i made sure 'cellular data' is enabled in settings for this app. what else could be going on? i am on t-mobile for last 3 years. just few days ago, i did a full reset of the phone (6plus and its running on iOS 11.2.6. after full reset and iOS upgrade, my carrier settings have been updated..i rebooted my phone. still see the issue).


could it be carrier related? on the server i do a tcpdump and i don't see any traffic from my device when i turn off wi-fi. any other debug ideas? has anyone seen this before?


appreciate any help.

thank you.

and the tcp port number is > 32768.

One notable thing about T-Mobile in the US is that they put modern iOS devices on an DNS64/NAT64 network, that is, a network that’s IPv6-only. It’s possible that your TCP code isn’t compatible with IPv6-only networks. There’s two ways you can test that theory:

  • You could test your app with a different WWAN provider, one that still supports legacy IPv4.

  • You could set up an IPv6-only test Wi-Fi and try your app there.

You can learn more about this whole issue in my Supporting IPv6-only Networks pinned post. Specifically, FAQ#1 points to the documentation about setting up a IPv6-only test Wi-Fi.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
tcp connection works only over wi-fi. not on cellular data
 
 
Q