Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I write an iPhone/iPad application that uses TCP/UDP communication?

Does Apple allow the use sockets (TCP or UDP) in iOS apps and allow them on the AppStore? If yes, please provide the official confirmation from Apple or some apps examples.

like image 599
Serge Avatar asked Feb 03 '26 14:02

Serge


1 Answers

Yes. Start with this landing page for iOS Networking topics. If you want to use UDP/TCP look at the CFNetwork Programming Guide; in particular streams.

Typically you would integrate bonjour in to your application so that you have the information needed to establish TCP/UDP communication via streams (BSD sockets):

Bonjour is the powerful zero configuration protocol from Apple that makes it easy to find systems and services on a local network automatically. Many services and applications on Mac OS X that have networking capabilities use Bonjour, from printer discovery, to chatting in iChat, to music sharing in iTunes. Bonjour includes a sophisticated, yet easy-to-use, programming interface that is accessible from Cocoa Touch or low-level C language.

like image 122
petert Avatar answered Feb 06 '26 03:02

petert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!