iOS app communicate with an app running in OSX via usb cable connection

后端 未结 2 2181
南旧
南旧 2021-02-11 05:06

Does iOS SDK provide a way to let iOS app talk to app running in OSX/Windows via usb cable connection? Or, socket is the only option?

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-11 05:38

    If you want to interact with an OS X program from iOS via USB, the PeerTalk lib seems to provide a convenient way to do so (without having to join the MFi program).

    According to the github page, PeerTalk

    Provides you with USB device attach/detach events and attached device's info

    Can connect to TCP services on supported attached devices (e.g. an iPhone), bridging the communication over USB transport

    Offers a higher-level API (PTChannel and PTProtocol) for convenient implementations.

    [is] Tested and designed for libdispatch (aka Grand Central Dispatch).

    It also

    has successfully been released on both the iOS and OS X app store.

    A great example is Duet Display which is a fantastic piece of software allowing you to use your iDevice as an extra display for your Mac using the Lightning or 30-pin cable. [...]

提交回复
热议问题