---
title: "activateWithError:"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/bemediaenvironment-n91a/activatewitherror:"
---

# activateWithError:

Activates the media environment.

## Declaration

```occ
- (BOOL) activateWithError:(NSError **) error;
```

## Parameters

- `error`: A pointer to an error object that describes why the method failed, or nil if no error occurred. Pass nil to ignore the error.

## See Also

### Managing media life cycle

- [initWithWebPageURL:](browserenginekit/bemediaenvironment-n91a/initwithwebpageurl:.md)
- [initWithXPCRepresentation:error:](browserenginekit/bemediaenvironment-n91a/initwithxpcrepresentation:error:.md)
- [suspendWithError:](browserenginekit/bemediaenvironment-n91a/suspendwitherror:.md)
