MultiPeer alternatives and similar libraries
Based on the "Networking" category.
Alternatively, view MultiPeer alternatives based on common mentions on social networks and blogs.
-
AFNetworking
A delightful networking framework for iOS, macOS, watchOS, and tvOS. -
CocoaAsyncSocket
Asynchronous socket networking library for Mac and iOS -
RestKit
RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X -
Reachability.swift
Replacement for Apple's Reachability re-written in Swift with closures -
ASIHTTPRequest
Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone -
YTKNetwork
YTKNetwork is a high level request util based on AFNetworking. -
swift-protobuf
Plugin and runtime library for using protobuf with Swift -
apollo-ios
๐ฑ ย A strongly-typed, caching GraphQL client for iOS, written in Swift. -
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! ๐ฆ -
RealReachability
We need to observe the REAL reachability of network. That's what RealReachability do. -
MonkeyKing
MonkeyKing helps you to post messages to Chinese Social Networks. -
SwiftHTTP
Thin wrapper around NSURLSession in swift. Simplifies HTTP requests. -
APIKit
Type-safe networking abstraction layer that associates request type with response type. -
ResponseDetective
Sherlock Holmes of the networking layer. :male_detective: -
Networking
Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support -
XMNetworking
A lightweight but powerful network library with simplified and expressive syntax based on AFNetworking. -
Pitaya
๐ A Swift HTTP / HTTPS networking library just incidentally execute on machines -
Reach
A simple class to check for internet connection availability in Swift. -
Digger
Digger is a lightweight download framework that requires only one line of code to complete the file download task -
SOAPEngine
This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and AppleTV app. -
TRON
Lightweight network abstraction layer, written on top of Alamofire -
TWRDownloadManager
A modern download manager based on NSURLSession to deal with asynchronous downloading, management and persistence of multiple files. -
Transporter
A tiny library makes uploading and downloading easier -
Restofire
Restofire is a protocol oriented networking client for Alamofire -
ws โ๏ธ
โ ๏ธ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing) -
EVURLCache
a NSURLCache subclass for handling all web requests that use NSURLRequest -
AFNetworking+RetryPolicy
Nice category that adds the ability to set the retry interval, retry count and progressiveness. -
ROADFramework
ROAD โ Rapid Objective-C Applications Development -
AFNetworking-Synchronous
Synchronous requests for AFNetworking 1.x, 2.x, and 3.x
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of MultiPeer or a related project?
README
A wrapper for Apple's MultipeerConnectivity framework for offline data transmission between Apple devices. This framework makes it easy to automatically connect to multiple nearby devices and share information using either bluetooth or wifi radios.
Features
- [x] Supports iOS/macOS/tvOS
- [x] Auto Connection
- [x] Auto Invitations/Advertising
- [x] Send/Receive data via MultipeerConnectivity Framework
- [x] Specify data types for easy handling
Integration
CocoaPods
You can use CocoaPods to install MultiPeer
by adding it to your Podfile
:
pod 'MultiPeer'
Carthage
You can use Carthage to install MultiPeer
by adding it to your Cartfile
:
github "dingwilson/MultiPeer"
Swift Package Manager
For SPM, add the following to your package dependencies:
.package(url: "https://github.com/dingwilson/MultiPeer.git", .upToNextMinor(from: "0.0.0"))
Usage
To get started, import MultiPeer.
import MultiPeer
Then, simply initialize MultiPeer with the name of your session (serviceType
). There are two modes of connections (advertiser
and browser
). To utilize both, simply use .autoConnect()
.
MultiPeer.instance.initialize(serviceType: "demo-app")
MultiPeer.instance.autoConnect()
Any data transmitted by MultiPeer will always be accompanied by a numerical "type", to ensure other peers know what kind of data is being received, and how to properly process it. You can manage this by creating a UInt32
enum, as shown below:
enum DataType: UInt32 {
case string = 1
case image = 2
// ...
}
To send data, simply use the .send(object: type:)
function:
MultiPeer.instance.send(object: "Hello World!", type: DataType.string.rawValue)
To receive data, we must conform to the MultiPeerDelegate
protocol:
func multiPeer(didReceiveData data: Data, ofType type: UInt32, from peerID: MCPeerID) {
switch type {
case DataType.string.rawValue:
let string = data.convert() as! String
// do something with the received string
break
case DataType.image.rawValue:
let image = UIImage(data: data)
// do something with the received UIImage
break
default:
break
}
}
func multiPeer(connectedDevicesChanged devices: [String]) {
}
Ensure that you set the MultiPeer delegate.
MultiPeer.instance.delegate = self
Finally you'll need to enable incoming / outgoing connections in your entitlements.
Congratulations! You have successfully sent data using MultiPeer! For more detailed information (including details of other functions), please see the docs.
Example
For an example app using MultiPeer, checkout MultiPeer_Sample.
License
MultiPeer
is released under an MIT License. See [LICENSE](LICENSE) for details.
Authors
Project heavily inspired by Apple-Signal.
*Note that all licence references and agreements mentioned in the MultiPeer README section above
are relevant to that project's source code only.