GCKOpenURLOptions Class Reference

An object representing options that can be passed to a Cast-enabled application via a deep-link URL. More...

#import <GCKOpenURLOptions.h>

+ Inheritance diagram for GCKOpenURLOptions:

Instance Methods

(NSURLQueryItem *) - asURLQueryItem
 Converts the options into a URL query item. More...
 

Class Methods

(GCKOpenURLOptions *GCK_NULLABLE_TYPE) + openURLOptionsFromURL:
 Extracts the Cast-specific options from the specified URL. More...
 

Properties

NSString * deviceUniqueID
 The unique ID of the device to connect to. More...
 
NSString * deviceFriendlyName
 The friendly name of the device to connect to. More...
 
NSString * sessionID
 The session ID of the Cast session to join. More...
 

Detailed Description

An object representing options that can be passed to a Cast-enabled application via a deep-link URL.

The source app encodes the Cast-specific options (including the unique ID of the device to cast to, and optionally the session ID of a specific Cast session to join) in a query parameter of the application URL using asURLQueryItem (GCKOpenURLOptions), and then opens the URL using UIApplication's -[openURL:options:completionHandler:] method. The target app extracts the Cast-specific options from the URL it receives in its UIApplicationDelegate's -[application:openURL:options:] method by calling openURLOptionsFromURL: (GCKOpenURLOptions). It then starts or joins a Cast session by passing these options to startSessionWithOpenURLOptions:sessionOptions: (GCKSessionManager).

Since
4.0

Method Documentation

- (NSURLQueryItem *) asURLQueryItem

Converts the options into a URL query item.

Returns
The options as an NSURLQueryItem.
+ (GCKOpenURLOptions *GCK_NULLABLE_TYPE) openURLOptionsFromURL: (NSURL *)  url

Extracts the Cast-specific options from the specified URL.

Returns
The extracted options, or nil if the URL did not contain any Cast-specific options.

Property Documentation

- (NSString*) deviceFriendlyName
readwritenonatomiccopy

The friendly name of the device to connect to.

Optional. This value is not used by the GoogleCast framework, but may be of interest to the receiving application.

- (NSString*) deviceUniqueID
readwritenonatomiccopy

The unique ID of the device to connect to.

Required.

- (NSString*) sessionID
readwritenonatomiccopy

The session ID of the Cast session to join.

Optional. A value of nil indicates that any currently active session should be joined, or if there is none, that a new one should be created.


The documentation for this class was generated from the following file: