EthanLipnik / SSMP

Second Screen Mode Protocol allows for any iOS device to become a desktop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSMP

Second Screen Mode Protocol for iOS

This is a Pre-release

Swift PodVersion Carthage Compatible Platform: iOS

Example project

What is SSMP?

SSM or Second Screen Mode Protocol is an open source framework for iOS writen in Swift that makes it easy for apps to take advantage of a second display (through a cable or AirPlay).

What does it do?

When your device is connected to a display, the device becomes a mouse and keyboard. The display has the main view. It adds a mouse pointer which does all the normal touch inputs.

Installation

Cocoapods

Add this to your Podfile

pod 'SSMP'

Carthage

Add this to your Cartfile

github "Devecstatic/SSMP"

Framework

Download the most recent from the releases.

Usage

Setup

In your AppDelegate, set the view controller the second display should have:

SSMPApp.default.viewController = MyAppMainViewController()

If you want to set whats on the device's display (You will lose the mouse pointer):

SSMPApp.default.deviceViewController = MyOtherViewController()

Replace all gesture recognizers with SSMP{type}GestureRecognizer. For example, UITapGestureRecognizer changes to SSMPTapGestureRecognizer

Options

For SSMPApp:

verboseLogging: Bool
allowedClickTypes: [clickType]
clickType = .tap, .hardpress
primaryBackgroundColor: UIColor

To Start

SSMPApp.default.start()

About

Second Screen Mode Protocol allows for any iOS device to become a desktop

License:MIT License


Languages

Language:Makefile 72.0%Language:Objective-C 18.5%Language:Swift 9.2%Language:Ruby 0.3%Language:C 0.1%