# Environment tags

Environment tags provide a quick and easy way to change multiple configuration properties at the same time. Environment tags are optional and can be specified in any List or Editable List configuration properties, in the key of any key-value pairs.

For example, you may have the following development environments: DEV, TEST, PVT (and Production which would be the default reset state of the app). Environment tags in the key of key-value pairs are not case sensitive, but we recommend using uppercase. Environment tags are wrapped in `{` `}` characters.

{% tabs %}
{% tab title="Swift" %}

```swift
import AppfigurateLibrary

@objcMembers class Configuration: APLConfiguration {

    @IntPropertyList(description: "Quality rating", restart: false, values: [
        "{DEV,TEST}Low": 10, 
        "{PVT}Average": 50, 
        "Excellent": 95
    ])
    var rating: Int
    
    override func environmentTags() -> [String] {
        return ["Dev", "Test", "PVT"]
    }
    
    override func reset() {
        rating = 10
    }
    ...
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
@import AppfigurateLibrary;

@interface Configuration : APLConfiguration

@property(nonatomic, assign) NSInteger rating;

@end

@implementation Configuration

INT_PROPERTY_LIST(rating, @"Quality rating", NO, @{
    @"{DEV,TEST}Low": @10, 
    @"{PVT}Average": @50, 
    @"Excellent": @95
});

- (NSArray<NSString*>*) environmentTags {
    return @{@"Dev", @"Test", @"PVT"};
}

- (void) reset {
    self.rating = 10;
}
...
```

{% endtab %}
{% endtabs %}

The list returned by the `environmentTags` method is used for validation of key usage on startup of your app, and to display the list of environment tags in the UI, in the order and casing specified:

<figure><img src="/files/7WU3jvQ28kSYEhoqNTep" alt="" width="375"><figcaption><p>iOS</p></figcaption></figure>

Tapping any of the segments in Appfigurate will automatically change all of the List or Editable List  configuration properties to the appropriate value.

If you change any List or Editable List value to a conflicting value (e.g. you had selected PVT, but have now selected a single List value that is marked as DEV), then Appfigurate will deselect any highlighted segment:

<figure><img src="/files/a7YuSdNaR3wgCsA32N2S" alt="" width="375"><figcaption><p>iOS</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.electricbolt.co.nz/configuration-subclasses/environment-tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
