AZPeerToPeerConnection alternatives and similar libraries
Based on the "Bluetooth" category.
Alternatively, view AZPeerToPeerConnection alternatives based on common mentions on social networks and blogs.
-
BabyBluetooth
:baby: The easiest way to use Bluetooth (BLE )in ios/os ,even bady can use . 一个非常容易使用的蓝牙库,适用于ios和os -
PeerKit
An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps -
Discovery
A very simple library to discover and retrieve data from nearby devices (even if the peer app works at background). -
LGBluetooth
Simple, block-based, lightweight library over CoreBluetooth. Will clean up your Core Bluetooth related code. -
CocoaMultipeer
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 -
ExtendaBLE
Blocks Based Bluetooth LE Connectivity framework for iOS/watchOS/tvOS/OSX. Quickly configure centrals & peripherals, perform read/write operations, and respond characteristic updates.
CodeRabbit: AI Code Reviews for Developers
* 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 AZPeerToPeerConnection or a related project?
README
AZPeerToPeerConnection Controller
Features
- Multipeer Connectivity
- Connection via Bluetooth or Wifi
- No need write all session, browser, services delegate
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate AZ PeerToPeerConnection into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'AZPeerToPeerConnection'
end
Then, run the following command:
$ pod install
Usage
Step 1
- With P2PServiceHandler.sharedInstance setup connection and make sure to implement it's delegate
let connection = P2PServiceHandler.sharedInstance
override func viewDidLoad() {
super.viewDidLoad()
connection.delegate = self
connection.setupConnection(serviceName: "AZP2Ptest")
tableView.estimatedRowHeight = 50
tableView.rowHeight = UITableViewAutomaticDimension
textField.delegate = self
}
Step 2
- Next you need to connect to other devices, to do taht you just need to open McBrowser
- You can pass your own McBrowser or just nil, it will present browser
connection.joinSession(vc: self, mcBrowser: nil) // nil == default mcbrowsr
Step 3
- Send data to other devices
- To send data it is better to send in form of Dictionary
connection.sendData(data: ["message": textField.text ?? "defaultValue"]) // send data of type [String: Any]
Step 4
- To receive data you have to implement delegate method
func didRecieve(_ serviceHandler: P2PServiceHandler, data: [String : Any]) {
DispatchQueue.main.async {
if let val = data["message"] {
print(val)// data recieved
}
}
}
Done
Thats it, you successfully integrate AZPeerToPeerConnection
License
AZPeerToPeerConnection is available under the MIT license. See the LICENSE file for more info.
Author
Afroz Zaheer - (https://github.com/AfrozZaheer)
*Note that all licence references and agreements mentioned in the AZPeerToPeerConnection README section above
are relevant to that project's source code only.