---
title: environment
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsworkspace/openconfiguration/environment
---

# environment

The set of environment variables to set in a new app instance.

## Declaration

```swift
var environment: [String : String] { get set }
```

## Discussion

Discussion The default value of this property is an empty dictionary. When launching a new instance of an app, use this property to specify the key/value pairs for any environment variables. If the calling process is sandboxed, the system ignores the value of this property.

## See Also

### Specifying launch attributes

- [appleEvent](appkit/nsworkspace/openconfiguration/appleevent.md)
- [arguments](appkit/nsworkspace/openconfiguration/arguments.md)
- [architecture](appkit/nsworkspace/openconfiguration/architecture.md)
