optimizely / optimizely/swift-sdk
[ENHANCEMENT] Async-await start to return result
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 24
- Forks
- 39
- Avg merge
- 13h 3m
- Merged PRs (30d)
- 2
Description
Description
Currently the async-await start implementation is a wrapper for the asynchronous completion handler start function. It resumes when the data file is downloaded, but discards the file data.
A simple change would be to make start return Data and replace
case .success:
continuation.resume()
with
case .success(let datafile):
continuation.resume(returning: datafile)
Benefits
This will simplify SDK usage in modern Swift code
Detail
No response
Examples
No response
Risks/Downsides
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the async-await start implementation and its asynchronous completion-handler start function. Update the success path so the async-await start returns the downloaded Data, then verify that callers receive the file data instead of only waiting for completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100