Application

@objc public class Application: Channel

An Application represents an application on the TV device. Use this class to control various aspects of the application such as launching the app or getting information

  • id

    The id of the channel

    Declaration

    Swift

    public private(set) var id: String!
  • start arguments

    Declaration

    Swift

    public private(set) var args: [String:AnyObject]? = nil
  • Bundle Indentifier

    Declaration

    Swift

    public static let BUNDLE_IDENTIFIER = "com.samsung.sta.multiscreen.MSF"
  • property value library

    Declaration

    Swift

    public static let PROPERTY_VALUE_LIBRARY = "IOS SDK";
  • Retrieves information about the Application on the TV

    Declaration

    Swift

    public func getInfo(completionHandler: (info: [String:AnyObject]?, error: NSError?) -> Void)

    Parameters

    completionHandler

    The callback handler with the status dictionary and an error if any

  • Launches the application on the remote device, if the application is already running it returns success = true. If the startOnConnect is set to false this method needs to be called in order to start the application

    Declaration

    Swift

    public func start(completionHandler: ((success: Bool, error: NSError?) -> Void)?)

    Parameters

    completionHandler

    The callback handler

  • Stops the application on the TV

    Declaration

    Swift

    public func stop(completionHandler: ((success: Bool, error: NSError?) -> Void)?)

    Parameters

    completionHandler

    The callback handler

  • Starts the application install on the TV, this method will fail for cloud applications

    Declaration

    Swift

    public func install(completionHandler: ((success: Bool, error: NSError?) -> Void)?)

    Parameters

    completionHandler

    The callback handler

  • override channel connect. connects your client with the host TV app - parameter attributes: Any attributes you want to associate with the client (ie. [name:FooBar]) - parameter completionHandler: The callback handler

    Declaration

    Swift

    public override func connect(attributes: [String : String]?, completionHandler: ((client: ChannelClient?, error: NSError?) -> Void)?)

    Parameters

    attributes

    Any attributes you want to associate with the client (ie. [name:FooBar])

    completionHandler

    The callback handler

  • Disconnects your client with the host TV app

    Declaration

    Swift

    public func disconnect(leaveHostRunning leaveHostRunning: Bool, completionHandler: ((client: ChannelClient?, error: NSError?) -> Void)?)

    Parameters

    leaveHostRunning

    True leaves the TV app running ,False stops the TV app if yours is the last client

    completionHandler

    The callback handler

  • Disconnect from the channel and leave the host application running if leaveHostRunning is set to true and you are the last client

    Declaration

    Swift

    public func disconnect(leaveHostRunning leaveHostRunning: Bool)

    Parameters

    leaveHostRunning

    True leaves the TV app running False stops the TV app if yours is the last client

  • Disconnect from the channel and terminate the host application if you are the last client

    Declaration

    Swift

    public override func disconnect(completionHandler: ((client: ChannelClient?, error: NSError?) -> Void)?)

    Parameters

    completionHandler

    The callback handler