# 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!

- `args`

  start arguments

  #### Declaration

  Swift

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

- `BUNDLE_IDENTIFIER`

  Bundle Indentifier

  #### Declaration

  Swift

      public static let BUNDLE_IDENTIFIER = "com.samsung.sta.multiscreen.MSF"

- `PROPERTY_VALUE_LIBRARY`

  property value library

  #### Declaration

  Swift

      public static let PROPERTY_VALUE_LIBRARY = "IOS SDK";

- `getInfo(_:)`

  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

- `start(_:)`

  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

- `stop(_:)`

  Stops the application on the TV

  #### Declaration

  Swift

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

  #### Parameters

  `completionHandler` | The callback handler

- `install(_:)`

  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

- `connect(_:completionHandler:)`

  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

- `disconnect(leaveHostRunning:completionHandler:)`

  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(leaveHostRunning:)`

  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(_:)`

  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

© 2016 . All rights reserved. (Last updated: 2016-10-27)

Generated by jazzy ♪♫ v0.7.2, a Realm project.