开发者

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

Does Apple al开发者_JAVA百科low 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜