All Projects → kirankunigiri → Apple Family

kirankunigiri / Apple Family

Licence: mit
A simple framework that brings Apple devices together - like a family

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Apple Family

Androbd
Android OBD diagnostics with any ELM327 adapter
Stars: ✭ 573 (+871.19%)
Mutual labels:  usb, wifi, bluetooth
Rtl8723bs
Realtek SDIO Wi-Fi driver
Stars: ✭ 260 (+340.68%)
Mutual labels:  wifi, bluetooth
8821au-20210708
Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets - v5.12.5.2
Stars: ✭ 40 (-32.2%)
Mutual labels:  usb, wifi
Gimx
The GIMX software.
Stars: ✭ 421 (+613.56%)
Mutual labels:  usb, bluetooth
Apple-Signal
Connect Apple devices via bluetooth and wifi.
Stars: ✭ 27 (-54.24%)
Mutual labels:  wifi, bluetooth
seeed-ambd-firmware
This RTL8720DN firmware export a RPC server interface through hardware SPI/UART port to MCU.
Stars: ✭ 20 (-66.1%)
Mutual labels:  wifi, bluetooth
React Native System Setting
A library to access system setting, and change it easily. eg: volume, brightness, wifi
Stars: ✭ 319 (+440.68%)
Mutual labels:  wifi, bluetooth
DualSenseWindows UE4
Unreal Engine 4 port of the Windows API for the PS5 DualSense controller created at Ohjurot/DualSense-Windows
Stars: ✭ 25 (-57.63%)
Mutual labels:  usb, bluetooth
Find3
High-precision indoor positioning framework, version 3.
Stars: ✭ 4,256 (+7113.56%)
Mutual labels:  wifi, bluetooth
Hidapi
A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows.
Stars: ✭ 465 (+688.14%)
Mutual labels:  usb, bluetooth
Sparrow Wifi
Next-Gen GUI-based WiFi and Bluetooth Analyzer for Linux
Stars: ✭ 525 (+789.83%)
Mutual labels:  wifi, bluetooth
Low power TTGO T-beam
Low power consumption for TTGO t-beam
Stars: ✭ 45 (-23.73%)
Mutual labels:  wifi, bluetooth
react-native-google-nearby-messages
📲 Communicate with nearby devices using Bluetooth, BLE, WiFi and near-ultrasonic audio. Broadcast and receive small payloads (like strings) using the easy-to-use React Native API!
Stars: ✭ 143 (+142.37%)
Mutual labels:  wifi, bluetooth
Servus
Ad-hoc peer-to-peer iOS library
Stars: ✭ 27 (-54.24%)
Mutual labels:  wifi, bluetooth
8821au
Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets
Stars: ✭ 67 (+13.56%)
Mutual labels:  usb, wifi
Blynk Library
Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc.
Stars: ✭ 3,305 (+5501.69%)
Mutual labels:  wifi, bluetooth
ESP32 IMU BARO GPS VARIO
GPS altimeter/variometer with LCD display, routes with waypoints, data/gps track logging, bluetooth NMEA sentence transmission, wifi AP + webpage configuration
Stars: ✭ 72 (+22.03%)
Mutual labels:  wifi, bluetooth
8814au
Linux Driver for USB WiFi Adapters that are based on the RTL8814AU Chipset
Stars: ✭ 283 (+379.66%)
Mutual labels:  usb, wifi
Mobly
E2E test framework for tests with complex environment requirements.
Stars: ✭ 424 (+618.64%)
Mutual labels:  wifi, bluetooth
Node Escpos
🖨️ ESC/POS Printer driver for node
Stars: ✭ 752 (+1174.58%)
Mutual labels:  usb, bluetooth

Banner

Apple Family Platform

License MIT Build Passing

A simple framework that brings Apple devices together - like a family. It will automatically use bluetooth, wifi, or USB to connect and communicate with other Apple devices and share information. Currently supports iOS and macOS.

This library is a combination of 2 others I wrote: Apple Signal for wifi and bluetooth communication, and Peertalk Simple for USB communication. Check them out if you only want one of these features.

Demo

Banner

Installation

Grab the files from the source folder and drag them to your project! You also need to have peertalk by Rasmus installed.

Example

Family is simple to setup. Just start the connection, and you can start sending and receiving data! Check out the Xcode demo project for a full implementation .

Setup

Start the connection. Specify a port number, which can be any 4 digit number, and a service type, which is a string limited to 15 characters and 1 hyphen. In order to be discovered, a device must use the same port number and service type. There are also multiple connection types for wifi/bluetooth connectivity. Check the Signal docs for a description of each Signal type.

Family.instance.delegate.addDelegate(delegate: self)
Family.instance.initialize(portNumber: 2345, serviceType: "family-example", signalType: .Automatic)

Next, we also need to run a method in the App Delegate when the app restarts because the usb connection automatically disconnects when the iPhone is put to sleep.

func applicationDidBecomeActive(_ application: UIApplication) {
    Family.instance.reconnect()
}

Send Data

In Family, you can add a tag to the data you send so that the receiver knows what the data is. You can create a UInt32 enum to manage them. Here's an example:

enum DataType: UInt32 {
    case string = 100
    case image = 101
}

Send some text, and specify its type using our enum. Family automatically converts objects to data using NSKeyedArchiver, so if you want to send your own data, use the sendData method instead.

Family.instance.sendObject(object: "Hello World!", type: DataType.string.rawValue)

Receive Data (Protocol)

The protocol conformation. We get the data, check its type, convert it back to the according object, and update our UI. The class has an extension to the Data class - the method convert() - that uses the NSKeyedArchiver class to convert data back into the object you need. You can also update the list of connected devices with the second method.

func family(didReceiveData data: Data, ofType type: UInt32) {
    if type == DataType.string.rawValue {
        let string = data.convert() as! String
    } else if type == DataType.image.rawValue {
        let image = UIImage(data: data)
    }
}

func family(connectedDevicesChanged devices: [String]) {}

And we just setup communication session between devices. It's that simple!

Contribute

Feel free to to contribute to the project with a pull request or open up an issue for any new features or bug fixes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].