# GCKDiscoveryCriteria Class

[Instance Methods](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#pub-methods) \| [Public Attributes](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#pub-attribs) \| [Properties](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#properties) GCKDiscoveryCriteria Class Reference

## Overview

Device discovery filter criteria.

Since
:   4.0

Inherits NSObject, \<NSCopying\>, and \<NSSecureCoding\>.

|---|---|
| ## Instance Method Summary ||
| (instancetype) | - [initWithApplicationID:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a24380d2a971176bc43cd24abebce1510) |
|   | Initializes a new [GCKDiscoveryCriteria](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria "Device discovery filter criteria. ") with a receiver application ID. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a24380d2a971176bc43cd24abebce1510) |
|   ||
| (instancetype) | - [initWithNamespaces:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a44657abda59243628d45b0a338043e03) |
|   | Initializes a new [GCKDiscoveryCriteria](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria "Device discovery filter criteria. ") with the given attributes. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a44657abda59243628d45b0a338043e03) |
|   ||

|---|---|
| ## Public Attributes ||
| NSString \*const | [kGCKDefaultMediaReceiverApplicationID](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#afdc0b28918da784869cab98df3698294) |
|   | The receiver application ID for the Default Media Receiver. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#afdc0b28918da784869cab98df3698294) |
|   ||

|---|---|
| ## Property Summary ||
| NSOrderedSet\< NSString \* \> \* | [applicationIDs](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#ac62a8989a1d83e979432a903bb00dbf4) |
|   | A list of supported receiver application IDs to test for. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#ac62a8989a1d83e979432a903bb00dbf4) |
|   ||
| BOOL | [hasApplicationIDs](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a278562e6824ef0384ffb782208a81b7a) |
|   | Whether the discovery criteria includes any application IDs. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a278562e6824ef0384ffb782208a81b7a) |
|   ||
| NSSet\< NSString \* \> \* | [namespaces](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a297cd043c233ee70b02ba5ae742358e8) |
|   | A list of supported namespaces to test for. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a297cd043c233ee70b02ba5ae742358e8) |
|   ||
| BOOL | [hasNamespaces](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a03c01a7813e02e552d2e3bd705a371fc) |
|   | Whether the discovery criteria includes any namespaces. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#a03c01a7813e02e552d2e3bd705a371fc) |
|   ||
| NSSet\< NSString \* \> \* | [allSubtypes](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#af39a3d45e9d41cf0fd4ca4234f1d5727) |
|   | The discovery criteria as a set of mDNS subtypes. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria#af39a3d45e9d41cf0fd4ca4234f1d5727) |
|   ||

## Method Detail

|---|---|---|---|---|
| - (instancetype) initWithApplicationID: |   | (NSString \*) | *applicationID* |   |

Initializes a new [GCKDiscoveryCriteria](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria "Device discovery filter criteria. ") with a receiver application ID.

Parameters
:

    |---|---|
    | applicationID | The receiver application ID. |


|---|---|---|---|---|
| - (instancetype) initWithNamespaces: |   | (NSSet\< NSString \* \> \*) | *namespaces* |   |

Initializes a new [GCKDiscoveryCriteria](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_discovery_criteria "Device discovery filter criteria. ") with the given attributes.

Parameters
:

    |---|---|
    | namespaces | A set of namespaces. |


## Member Data Documentation

|---|
| - (NSString\* const) kGCKDefaultMediaReceiverApplicationID |

The receiver application ID for the Default Media Receiver.

## Property Detail

|---|---|
| |---| | - (NSOrderedSet\<NSString \*\>\*) applicationIDs | | readnonatomicstrong |

A list of supported receiver application IDs to test for.

|---|---|
| |---| | - (BOOL) hasApplicationIDs | | readnonatomicassign |

Whether the discovery criteria includes any application IDs.

|---|---|
| |---| | - (NSSet\<NSString \*\>\*) namespaces | | readnonatomicstrong |

A list of supported namespaces to test for.

|---|---|
| |---| | - (BOOL) hasNamespaces | | readnonatomicassign |

Whether the discovery criteria includes any namespaces.

|---|---|
| |---| | - (NSSet\<NSString \*\>\*) allSubtypes | | readnonatomicstrong |

The discovery criteria as a set of mDNS subtypes.