How do I force an iOS app to use 3G instead of WiFi?

后端 未结 3 715
逝去的感伤
逝去的感伤 2020-12-16 07:57

I want to use a messaging protocol that works fine over 3G, but not over some corporate firewalls. How can my app force the use of the cellular network when it fails to conn

3条回答
  •  太阳男子
    2020-12-16 07:58

    You can use any of the socket library to force to use cellular. Find the cellular interface from getifaddrs, pass the interface to the socket function, socket bind will happen with cellular. e.g. CocoaAsyncSocket

提交回复
热议问题