Coder Social home page Coder Social logo

veryfun / peertalk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rsms/peertalk

0.0 2.0 0.0 722 KB

iOS and Mac Cocoa library for communicating over USB

Home Page: http://rsms.me/peertalk/

License: MIT License

Objective-C 84.04% CSS 2.93% HTML 12.58% C 0.45%

peertalk's Introduction

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.

Facebook's Origami uses PeerTalk for it's Origami Live iOS app (in fact, this is where PeerTalk was first used, back in 2012)

This probably means that you can use PeerTalk for apps aiming at the App Store.

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>

peertalk's People

Contributors

rsms avatar davidobfuscator avatar

Watchers

James Cloos avatar 翊榕 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.