> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# isActivePublisher()

> Reactive entitlement state updates using Combine

Returns a Combine publisher that emits changes to an entitlement's active state. Use this for reactive UI updates in SwiftUI or when you need automatic notifications when entitlement status changes.

## Signature

```swift theme={null}
public func isActivePublisher(
  for type: Entitlement,
  in scope: EntitlementScope = .all
) -> AnyPublisher<Bool, Never>
```

## Parameters

| Name    | Type                                    | Description                     |
| ------- | --------------------------------------- | ------------------------------- |
| `type`  | [Entitlement](./entitlements)           | The entitlement type to observe |
| `scope` | [EntitlementScope](./entitlement-scope) | The scope to check              |

## Returns

`AnyPublisher<Bool, Never>` - A publisher that emits `true` when the entitlement becomes active and `false` when it becomes inactive.

## Usage

```swift theme={null}
// Automatically update when state changes
Encore.shared
  .isActivePublisher(for: .freeTrial(), in: .verified)
  .sink { isActive in
    // Called whenever the state changes
  }
  .store(in: &cancellables)
```
