fix: use non-deprecated LDClient.start with startWaitSeconds - #58
Merged
Conversation
Co-Authored-By: jbailey@launchdarkly.com <accounts@sidewaysgravity.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
Author
|
@cursor review |
kinyoklion
marked this pull request as ready for review
August 10, 2026 22:07
kinyoklion
approved these changes
Aug 10, 2026
tanderson-ld
self-requested a review
August 12, 2026 14:33
tanderson-ld
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The example called the deprecated
LDClient.start(config:context:)overload (deprecated in the iOS SDK: "Use LDClient.start(config: context: startWithSeconds: completion:) to initialize the SDK with a defined timeout"), so building it emitted a deprecation warning. Switched to the supported timeout overload, matching what the sibling examples already do (hello-ios-swiftusesstartWaitSeconds: 30,hello-tvosuses10). Also madeconfigaletsince it is never mutated (Swift warns otherwise).No SDK version change was needed:
Package.resolvedalready pinsios-client-sdk11.3.0 andswift-eventsource3.3.0, which are the latest releases within the configuredupToNextMajorVersion11.0.0 requirement.Testing
No Xcode on Linux, so this was verified statically against the SDK source at tag 11.3.0 (the deprecation attribute and the replacement signature
start(config:context:startWaitSeconds:completion:)). The repo's own CI builds the workspace and theRunworkflow launches the app and asserts the window text, which covers the behavior change.Link to Devin session: https://app.devin.ai/sessions/b10ffc27579444828c87aa46bea06a52
Requested by: @jsonbailey
Note
Overview
Updates the hello-macos sample so LaunchDarkly initializes with the non-deprecated
LDClient.start(config:context:startWaitSeconds:)API instead of the two-argument overload that triggers a deprecation warning.LDConfigis now held in aletbecause it is not mutated, and startup uses a 10 second wait for the client to become ready—aligned with the other platform examples in this repo.Reviewed by Cursor Bugbot for commit 77501b2. Bugbot is set up for automated code reviews on this repo. Configure here.