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

Related tags

Bluetooth PeerKit
Overview

PeerKit

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

Usage

// Automatically detect and attach to other peers with this service type
PeerKit.transceive("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!"])

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

License

This project is under the MIT license.

Comments
  • Swift 2.0

    Swift 2.0

    This migrates PeerKit to Swift 2.0 - it is slightly horrible, because of loads of @available attributes being required to work on OS X and also because @rpath for test bundles seems messed up in the betas.

    You probably don't want this in master, but maybe it is a good idea to have either this PR open or a Swift 2 branch on the main repo?

    opened by neonichu 7
  • Deterministic algorithm for invitation acceptance

    Deterministic algorithm for invitation acceptance

    As recommended in WWDC 2014 session 709. Use the hash value of the MCPeerID object and whoever has the greater hash value can accept the invitation.

    http://asciiwwdc.com/2014/sessions/709?q=multipeer

    opened by alexanderjarvis 5
  • Any update for support Swift 3

    Any update for support Swift 3

    Hi

    I'm trying to convert your project into Swift 3 with XCode 8.1 beta, but it failed to convert.

    Any leads to solve this issue or plan to support Swift 3?

    Thanks!

    opened by harryhow 4
  • Swift 2.0 changes

    Swift 2.0 changes

    Includes fixes from the migration tool + other xcode things + something to make it actually compile instead of seg fault due to correct function sigs.

    opened by alexanderjarvis 3
  • Distribute through CocoaPods

    Distribute through CocoaPods

    Would you be amenable to distributing PeerKit through CocoaPods? I'm sure this would make many people's lives a little easier. The process isn't too involved.

    opened by nickswalker 2
  • PeerKit Additions

    PeerKit Additions

    Hello!

    Thanks for writing PeerKit. I made some local additions, mostly delegate methods that weren't implemented, including sending and receiving resources.

    I also added a way to customise the display name as it was just the device UUID by default with no way of changing it.

    Also, a way to stop transceiving that disconnects the sessions and the ability to set a new Transceiver e.g. when the display name is changed by a user.

    Thanks

    opened by alexanderjarvis 2
  • Problems with Xcode 7.3 Swift 2.2

    Problems with Xcode 7.3 Swift 2.2

    I've just created new project and imported there PeerKit via "pod install". This is what I've got https://www.dropbox.com/s/nsbavu537rkro3m/Screenshot%202016-05-02%2011.21.15.png?dl=0 26 errors caused by deprecated syntax (for example line 23 on the screenshot). What I'm doing wrong? How to install this lib correctly?

    opened by AndrewPetrov 1
  • PeerKit performances

    PeerKit performances

    Hi,

    I started by using MultiPeer Connectivity directly and I have faced multiple issues concerning file exchange. For instance, I can send files only up to 5m distance between two nodes. Beyond this distance, file exchange is not possible. Also, I try sending files of different sizes, ranging from 1KB to 10MB. Something, file exchange hangs with 5MB files and sometimes it works flawlessly. Maybe I'm doing something wrong but I could not find any paper or document giving information about the limitations etc of MPC. I know it is based on Bluetooth and Wifi and, thus, should have the same performances as these technologies but if someone has any information about that, I'll be happy to have them. Thanks a lot.

    opened by ooii 0
Releases(4.0.0)
Owner
JP Simard
JP Simard
Blocks Based Bluetooth LE Connectivity framework for iOS/watchOS/tvOS/OSX. Quickly configure centrals & peripherals, perform read/write operations, and respond characteristic updates.

ExtendaBLE Introduction ExtendaBLE provides a very flexible syntax for defining centrals and peripherals with ease. Following a blocks based builder a

Anton 94 Nov 29, 2022
Bluejay is a simple Swift framework for building reliable Bluetooth LE apps.

Bluejay is a simple Swift framework for building reliable Bluetooth LE apps. Bluejay's primary goals are: Simplify talking to a single Bluetooth LE pe

Steamclock Software 1k Dec 13, 2022
MiniVendingMachine - SwiftUI demo Apple Watch app to open a mini vending machine via bluetooth

Mini Vending Machine Use Apple Watch to open vending machine cells. Note: This a

CGH 3 Apr 8, 2022
CombineCoreBluetooth is a library that bridges Apple's CoreBluetooth framework and Apple's Combine framework

CombineCoreBluetooth is a library that bridges Apple's CoreBluetooth framework and Apple's Combine framework, making it possible to subscribe to perform bluetooth operations while subscribing to a publisher of the results of those operations, instead of relying on implementing delegates and manually filtering for the results you need.

Starry 74 Dec 29, 2022
Bluetooth mesh messaging SDK for apps

Berkanan SDK Berkanan SDK enables Bluetooth mesh messaging between nearby apps. It's the framework used by Berkanan Messenger (Product Hunt, TechCrunc

Zsombor Szabo 189 Jan 1, 2023
iOS Bluetooth LE framework

Features A futures interface replacing protocol implementations. Timeout for Peripheral connection, Service scan, Service + Characteristic discovery a

Troy Stribling 696 Dec 25, 2022
Build your own 'AirTags' 🏷 today! Framework for tracking personal Bluetooth devices via Apple's massive Find My network.

OpenHaystack is a framework for tracking personal Bluetooth devices via Apple's massive Find My network.

Secure Mobile Networking Lab 5.8k Jan 9, 2023
A simple framework that brings Apple devices together - like a family

Apple Family A simple framework that brings Apple devices together - like a family. It will automatically use bluetooth, wifi, or USB to connect and c

Kiran 62 Aug 21, 2022
Functional wrapper for Apple's MultipeerConnectivity framework.

A functional wrapper for the MultipeerConnectivity framework. PeerConnectivity is meant to have a lightweight easy to use syntax, be extensible and fl

Reid Chatham 48 Jun 28, 2021
📱📲 A wrapper for the MultipeerConnectivity framework for automatic offline data transmission between devices

A wrapper for Apple's MultipeerConnectivity framework for offline data transmission between Apple devices. This framework makes it easy to automatical

Wilson Ding 197 Nov 2, 2022
Bluetooth mapping in Swift

Bluetonium is part of the E-sites iOS Suite. Bluetonium is a Swift Library that makes it easy to communicate with Bluetooth devices. Features ?? Servi

E-sites 165 Nov 20, 2022
FileManagerExample - File Manager Example With Swift

FileManagerExample FileManager를 쉽게 설명하기 위한 문서입니다. let fileManager = FileMana

Jackson 0 Jan 6, 2022
An app for questioning people to try on different names and pronouns. A winner of the Swift Student Challenge 2022.

DiscoverMe is an app for questioning, trans, nonbinary, and gender-nonconforming people to try on different names and pronouns that better suit their

Joshua Tint 6 Oct 2, 2022
The official Swift Library for Vital API, HealthKit and Devices

vital-ios The official Swift Library for Vital API, HealthKit and Devices Install We currently support SPM. Documentation Please refer to the official

Vital 17 Dec 22, 2022
Swift implementation of Xiaomi's BLE authentication

MiAuth Xiaomi M365/Mi Authentication library written in Swift. Features M365 Authentication Mi Authentication (WIP - Login doesn't work reliably yet)

null 2 Jul 27, 2022
The Bluetooth LE library for iOS and Mac. 100% Swift.

iOS-BLE-Library An in-development Bluetooth Low Energy Library by Nordic Semiconductor to interact with the , which is not complicated, but requires w

Nordic Semiconductor 6 Dec 19, 2022
An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps

PeerKit An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps Usage // Automatically detect and attach to

JP Simard 861 Dec 23, 2022
Shawn Frank 2 Aug 31, 2022
AZPeerToPeerConnectivity is a wrapper on top of Apple iOS Multipeer Connectivity framework. It provides an easier way to create and manage sessions. Easy to integrate

AZPeerToPeerConnection Controller Features Multipeer Connectivity Connection via Bluetooth or Wifi No need write all session, browser, services delega

Afroz Zaheer 66 Dec 19, 2022
Linenoise-Swift A pure Swift implementation of the Linenoise library. A minimal, zero-config readline replacement.

Linenoise-Swift A pure Swift implementation of the Linenoise library. A minimal, zero-config readline replacement. Supports Mac OS and Linux Line edit

Andy Best 114 Dec 14, 2022