# GNSBeaconStrategy Class

[Class Methods](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#pub-static-methods) \| [Properties](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#properties) GNSBeaconStrategy Class Reference

## Overview

The strategy to use to scan for beacons.

Inherits NSObject.

|---|---|
| ## Class Method Summary ||
| (instancetype) | + [strategy](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#adb20ee9c949a83bb6b40f298afc8d18c) |
|   | Returns the default strategy, which uses the default values for all properties. [More...](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#adb20ee9c949a83bb6b40f298afc8d18c) |
|   ||
| (instancetype) | + [strategyWithParamsBlock:](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#ae4369cbfc0033043904d608a941ffab9) |
|   | Returns a custom strategy. You can set any of the optional properties in `paramsBlock`. [More...](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#ae4369cbfc0033043904d608a941ffab9) |
|   ||

|---|---|
| ## Property Summary ||
| BOOL | [includeIBeacons](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#a760bff5c7b04f6aca45f5eb1b00f64d6) |
|   | Scan also for nearby iBeacons. [More...](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#a760bff5c7b04f6aca45f5eb1b00f64d6) |
|   ||
| BOOL | [allowInBackground](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#a78563e40e80e958da3381600240063d7) |
|   | Try to scan for beacons when the app is in the background. [More...](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#a78563e40e80e958da3381600240063d7) |
|   ||
| BOOL | [lowPowerPreferred](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#a24d256ff2f7cf627b539534bb0a1241d) |
|   | Low power mode is available when scanning for Eddystone beacons only; it is ignored when iBeacons are included. [More...](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy#a24d256ff2f7cf627b539534bb0a1241d) |
|   ||

## Method Detail

|---|---|---|---|
| + (instancetype) strategy |   |   |   |

Returns the default strategy, which uses the default values for all properties.

|---|---|---|---|---|
| + (instancetype) strategyWithParamsBlock: |   | (void(\^)([GNSBeaconStrategyParams](https://developers.google.com/nearby/messages/ios/reference/interface_g_n_s_beacon_strategy_params) \*)) | *paramsBlock* |   |

Returns a custom strategy. You can set any of the optional properties in `paramsBlock`.

## Property Detail

|---|---|
| |---| | - (BOOL) includeIBeacons | | readnonatomicassign |

Scan also for nearby iBeacons.

The default is `YES`. Scanning for iBeacons triggers a location permission dialog from iOS, so you should set this to `NO` if you don't want to scan for iBeacons.

|---|---|
| |---| | - (BOOL) allowInBackground | | readnonatomicassign |

Try to scan for beacons when the app is in the background.

The default is `NO`.

|---|---|
| |---| | - (BOOL) lowPowerPreferred | | readnonatomicassign |

Low power mode is available when scanning for Eddystone beacons only; it is ignored when iBeacons are included.

Turn off low power mode if you prefer lower latency scanning, at a higher battery cost.

The default is `YES`.