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

Related tags

Networking 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
🌏 A zero-dependency networking solution for building modern and secure iOS, watchOS, macOS and tvOS applications.

A zero-dependency networking solution for building modern and secure iOS, watchOS, macOS and tvOS applications. ?? TermiNetwork was tested in a produc

Bill Panagiotopoulos 90 Dec 17, 2022
MQTTNIO - Non-blocking, event-driven Swift client for MQTT build on SwiftNIO

This library has support for WebSocket connections and TLS. It runs on all platforms Swift NIO runs on (e.g. macOS, iOS, Linux, etc.).

Steven Roebert 41 Dec 23, 2022
πŸ”Œ Non-blocking TCP socket layer, with event-driven server and client.

Original authors Honza Dvorsky - http://honzadvorsky.com, @czechboy0 Matthias Kreileder - @matthiaskr1 At the request of the original authors, we ask

Vapor Community 574 Dec 7, 2022
Control apps' wireless connectivity policy

AirKeeper This tweak replicates a feature in Chinese iPhone model by using Apple's own private APIs, which effectively writes to /var/preferences/com.

udevs 15 Dec 22, 2022
🌐 Makes Internet connectivity detection more robust by detecting Wi-Fi networks without Internet access.

Connectivity is a wrapper for Apple's Reachability providing a reliable measure of whether Internet connectivity is available where Reachability alone

Ross Butler 1.6k Dec 30, 2022
Make it easier to observe network connectivity in SwiftUI.

ReachabilityX ReachabilityX is built using NWPathMonitor from Apple's Network framework to provide an easy way to observe the network changes for Swif

Dscyre Scotti 8 Feb 4, 2022
Modern networking support to monitor network connectivity

ConnectivityKit Adapting to changes in network connectivity can allow for suspending or resuming network activity. When entering an elevator or going

Brennan Stehling 1 Nov 7, 2022
Open source SDK to quickly integrate subscriptions, stop worring about code maintenance, and getting advanced real-time data. Javascript / iOS glue framework

Open source SDK to quickly integrate subscriptions, stop worring about code maintenance, and getting advanced real-time data. Javascript / iOS glue framework

glassfy 5 Nov 7, 2022
Login-screen-using-Swift - Firebase Apple Open Source Development

Firebase Apple Open Source Development This repository contains all Apple platfo

Kushal Shingote 1 Feb 3, 2022
Open source Reddit client for iOS built entirely in Swift

Area51 Area51 is an open source Reddit client for iOS built entirely in Swift! Get the public beta on TestFlight Join the public Slack channel to coll

Kris 141 Dec 26, 2022
SwiftCANLib is a library used to process Controller Area Network (CAN) frames utilizing the Linux kernel open source library SOCKETCAN.

SwiftCANLib SwiftCANLib is a library used to process Controller Area Network (CAN) frames utilizing the Linux kernel open source library SOCKETCAN. Th

Tim Wise 4 Oct 25, 2021
SkyWite is an open-source and highly versatile multi-purpose frameworks.

SkyWite is an open-source and highly versatile multi-purpose frameworks. Clean code and sleek features make SkyWite an ideal choice. Powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.

SkyWite 24 Apr 22, 2022
Metatext A free, open-source iOS Mastodon client.

Metatext A free, open-source iOS Mastodon client. Contributing Bug Reports GitHub is used for bug tracking. Please search existing issues and create a

Metabolist 702 Jan 9, 2023
A computer-vision-driven app for detecting and mapping smog in public roads. Crowdsourcing is rewarded with NFTs. Uber Global Hackathon.

Smogify Detecting smog using ML and rewarding users with NFTs About The Project app in action: https://youtu.be/awJrP-sHb_I Under the growing uncertai

ASOFI 3 Aug 18, 2022
Approov Integration Examples 0 Jan 26, 2022
To practice URLSession to fetch json data from open weather API

⛅️ weatherApp-iOS-practice ?? κΈ°λŠ₯ 상세 λ„μ‹œ 이름을 μž…λ ₯ν•˜λ©΄ ν˜„μž¬ 날씨 정보λ₯Ό 가져와 화면에 ν‘œμ‹œλ˜κ²Œ λ§Œλ“€μ–΄μ•Ό ν•©λ‹ˆλ‹€

Jacob Ko 0 Dec 18, 2021
A type-safe, high-level networking solution for Swift apps

What Type-safe network calls made easy Netswift offers an easy way to perform network calls in a structured and type-safe way. Why Networking in Swift

Dorian Grolaux 23 Apr 27, 2022
A Swift Package that allows iOS apps to communicate with AltServer.

AltKit allows apps to communicate with AltServers on the same WiFi network and enable features such as JIT compilation.

Riley Testut 45 Sep 8, 2022
A peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework

This repository is a peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework (which is iOS only) that lets you connect any 2 devices from any platform. This framework works with peer to peer networks like bluetooth and ad hoc wifi networks when available it also falls back onto using a wifi router when necessary. It is built on top of CFNetwork and NSNetService. It uses the newest Swift 2's features like error handling and protocol extensions.

Manav Gabhawala 93 Aug 2, 2022