# TCGBPushConfiguration Class Reference

Inherits from | NSObject
Declared in | TCGBPushConfiguration.h

## Overview

The TCGBPushConfiguration class configures the behavior of TCGBPush.

## Properties

### `pushEnabled`

Enable push

`@property (nonatomic, assign) BOOL pushEnabled`

#### Declared In

`TCGBPushConfiguration.h`

### `ADAgreement`

Agreement of getting advertising push

`@property (nonatomic, assign) BOOL ADAgreement`

#### Declared In

`TCGBPushConfiguration.h`

### `ADAgreementNight`

Agreement of getting advertising push at night

`@property (nonatomic, assign) BOOL ADAgreementNight`

#### Declared In

`TCGBPushConfiguration.h`

### `displayLanguageCode`

Setting language of Push Message

`@property (nonatomic, strong, nullable) NSString *displayLanguageCode`

#### Declared In

`TCGBPushConfiguration.h`

### `alwaysAllowTokenRegistration`

Set whether to register a token even if permission to allow notifications is not obtained.

`@property (nonatomic, assign) BOOL alwaysAllowTokenRegistration`

#### Discussion

Warning: Default value is NO.

#### Declared In

`TCGBPushConfiguration.h`

## Initialization

### `+ pushConfigurationWithPushEnable:ADAgreement:ADAgreementNight:`

Creates a TCGBPushConfiguration instance with several properties.

`+ (instancetype)pushConfigurationWithPushEnable:(BOOL)enable ADAgreement:(BOOL)ADAgree ADAgreementNight:(BOOL)ADAgreeNight`

#### Parameters

`enable` | whether push enable or not.
`ADAgree` | `YES` if user agree on advertising push notification.
`ADAgreeNight` | `YES` if user agree on getting advertising push notification at night.

#### Declared In

`TCGBPushConfiguration.h`

### `+ pushConfigurationWithPushEnable:ADAgreement:ADAgreementNight:alwaysAllowTokenRegistration:`

Creates a TCGBPushConfiguration instance with several properties.

`+ (instancetype)pushConfigurationWithPushEnable:(BOOL)enable ADAgreement:(BOOL)ADAgree ADAgreementNight:(BOOL)ADAgreeNight alwaysAllowTokenRegistration:(BOOL)alwaysAllowTokenRegistration`

#### Parameters

`enable` | whether push enable or not.
`ADAgree` | `YES` if user agree on advertising push notification.
`ADAgreeNight` | `YES` if user agree on getting advertising push notification at night.
`alwaysAllowTokenRegistration` | When set to `YES`, the token is registered even if permission to grant notifications is not obtained. Default value is `NO`

#### Declared In

`TCGBPushConfiguration.h`

### `+ pushConfigurationWithPushEnable:ADAgreement:ADAgreementNight:displayLanguage:`

Creates a TCGBPushConfiguration instance with several properties.

`+ (instancetype)pushConfigurationWithPushEnable:(BOOL)enable ADAgreement:(BOOL)ADAgree ADAgreementNight:(BOOL)ADAgreeNight displayLanguage:(nullable NSString *)displayLanguage`

#### Parameters

`enable` | whether push enable or not.
`ADAgree` | `YES` if user agree on advertising push notification.
`ADAgreeNight` | `YES` if user agree on getting advertising push notification at night.
`displayLanguage` | set language code for Push. (kTCPushKeyLanguage in NHNCloud Push SDK)

#### Declared In

`TCGBPushConfiguration.h`

### `+ pushConfigurationWithPushEnable:ADAgreement:ADAgreementNight:displayLanguage:alwaysAllowTokenRegistration:`

Creates a TCGBPushConfiguration instance with several properties.

`+ (instancetype)pushConfigurationWithPushEnable:(BOOL)enable ADAgreement:(BOOL)ADAgree ADAgreementNight:(BOOL)ADAgreeNight displayLanguage:(nullable NSString *)displayLanguage alwaysAllowTokenRegistration:(BOOL)alwaysAllowTokenRegistration`

#### Parameters

`enable` | whether push enable or not.
`ADAgree` | `YES` if user agree on advertising push notification.
`ADAgreeNight` | `YES` if user agree on getting advertising push notification at night.
`displayLanguage` | set language code for Push. (kTCPushKeyLanguage in NHNCloud Push SDK)
`alwaysAllowTokenRegistration` | When set to `YES`, the token is registered even if permission to grant notifications is not obtained. Default value is `NO`

#### Declared In

`TCGBPushConfiguration.h`

### `+ pushConfigurationWithJSONString:`

Creates a TCGBPushConfiguration instance with several properties.

`+ (nullable instancetype)pushConfigurationWithJSONString:(NSString *)jsonString`

#### Parameters

`jsonString` | In this string, there should be `pushEnabled`, `adAgreement`, `adAgreementNight` keys in the json formatted string.

#### Declared In

`TCGBPushConfiguration.h`