Skip to content
/ PeerKit Public
forked from jpsim/PeerKit

An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps

License

Notifications You must be signed in to change notification settings

ykws/PeerKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PeerKit

An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps

Installation

CocoaPods

You can use CocoaPods to install YourLibrary by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'PeerKit'

Usage

// Automatically detect and attach to other peers with this service type
PeerKit.transceive(serviceType: "com-jpsim-myApp")

enum Event: String {
    case StartGame, EndGame
}

// Send a StartGame event with attached data to all peers
PeerKit.sendEvent(Event.StartGame.rawValue, object: ["myInfo": "hello!"] as AnyObject)

See the CardsAgainst app for example usage. Specifically the ConnectionManager class.

License

This project is under the MIT license.

About

An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 92.0%
  • Ruby 4.3%
  • Objective-C 3.7%