PeerTalk is an iOS and Mac Cocoa library for communicating over USB.
┌──────────────────────────────┐
│ ┌──────────────────────────┐ │
│ │ │ │
┌─────────┐ │ │ │ │
│┌───────┐│ │ │ Hello │ │
││ ││ │ │ │ │
││ Hello ││ │ │ │ │
││ ││ │ │ │ │
│└───────┘│ │ └──────────────────────────┘ │
│ ⃝ │ \ ─────────────────────────── \
└────╦────┘ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
║ ╔══════════■ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
╚═════════╝ \ ─────────────────────────── \
- meep - └─────────────────────────────┘
- beep -
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.
Tested and designed for libdispatch (aka Grand Central Dispatch).
Grab the goods from https://github.com/rsms/peertalk
PeerTalk 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.
This probably means that you can use PeerTalk for apps aiming at the App Store. Note however that there has been some reports of app submissions which make use of PeerTalk that have been denied publication in the app stores (although more recently we've only heard reports of success.)
Suck down the code and open peertalk.xcodeproj in Xcode 4.3 or later on OS X 10.7 or later.
Select the "peertalk" target and hit Cmd+U (Product → Test) and verify that the unit tests passed.
Select the "Peertalk Example" target and hit Cmd+R (Product → Run). You should se a less than-pretty, standard window with some text saying it's ready. That's the OS X example app you're looking at.
In Xcode, select the "Peertalk iOS Example" target for the iPhone Simulator, and hit Cmd+R (Product → Run). There should be some action going on now. Try sending some messages between the OS X app and the app running in the iPhone simulator.
Connect your iOS device (iPhone, iPod or iPad) and kill the iPhone simulator and go back to Xcode. Select the "Peertalk iOS Example" target for your connected iOS device. Hit Cmd+R (Product → Run) to build and run the sample app on your device.
It should work.
Demo video: http://www.youtube.com/watch?v=kQPWy8N0mBg
<iframe width="880" height="530" src="http://www.youtube.com/embed/kQPWy8N0mBg?hd=1&rel=0" frameborder="0" allowfullscreen></iframe>此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。