open-feature / open-feature/swift-sdk
Add Hook Data
- Dominant language
- Swift
- Stars
- 31
- Forks
- 14
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 2
Description
Allow hooks to share data across stages within a single flag evaluation.
**Specification References:**
- [4.1.1](https://openfeature.dev/specification/sections/hooks#requirement-411): Hook context MUST provide hook data.
- [4.6.1](https://openfeature.dev/specification/sections/hooks#requirement-461): Hook data MUST be a structure supporting the definition of arbitrary properties.
- [4.3.2](https://openfeature.dev/specification/sections/hooks#requirement-432): Hook data is scoped to a specific hook instance.
**Implementation Notes:**
- Add `hookData: [String: Any]` to `HookContext`
- Each hook instance gets its own hook data dictionary per evaluation
- Enables use cases like OpenTelemetry span propagation between hook stages
Contributor guide
Research direction
Start by locating HookContext and the hook evaluation lifecycle. Trace how individual hook instances are represented across stages, then verify that each instance receives its own per-evaluation data structure and that hook data can hold arbitrary properties without leaking between evaluations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api, mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100