1 Star 0 Fork 0

yangwu / peertalk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

peertalk

PeerTalk is an iOS and Mac Cocoa library for communicating over USB.

                         ┌──────────────────────────────┐
                         │ ┌──────────────────────────┐ │
                         │ │                          │ │
  ┌─────────┐            │ │                          │ │
  │┌───────┐│            │ │          Hello           │ │
  ││       ││            │ │                          │ │
  ││ Hello ││            │ │                          │ │
  ││       ││            │ │                          │ │
  │└───────┘│            │ └──────────────────────────┘ │
  │    ⃝    │            \  ─────────────────────────── \
  └────╦────┘             \  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
       ║         ╔══════════■ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
       ╚═════════╝          \  ─────────────────────────── \
      - meep -               └─────────────────────────────┘
         - beep -

Highlights

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

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

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

  4. Tested and designed for libdispatch (aka Grand Central Dispatch).

Grab the goods from https://github.com/rsms/peertalk

Usage in Apple App Store

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.)

Getting started

Suck down the code and open peertalk.xcodeproj in Xcode 4.3 or later on OS X 10.7 or later.

  1. Select the "peertalk" target and hit Cmd+U (Product → Test) and verify that the unit tests passed.

  2. 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.

  3. 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.

  4. 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>
Copyright (c) 2012 Rasmus Andersson <http://rsms.me/> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

iOS and Mac Cocoa library for communicating over USB 展开 收起
Objective-C
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Objective-C
1
https://gitee.com/kongfu_yang/peertalk.git
git@gitee.com:kongfu_yang/peertalk.git
kongfu_yang
peertalk
peertalk
master

搜索帮助