Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
/ SSMP Public archive

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

License

Notifications You must be signed in to change notification settings

EthanLipnik/SSMP

Repository files navigation

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published