Skip to content

Swift 6 Mode breaks the LaunchDarkly SDK #419

@choulepoka

Description

@choulepoka

Describe the bug

When enabling Swift 6 and invoking LDClient.identify(context:timeout:completion:), the program will hard crash.

To reproduce

  • Enable Swift 6 on your project using the Swift Language Version build settings
  • Launch the app
  • Invoke any LD Code that takes a completion handler in parameter

Expected behavior

The call succeeds

Logs

image

Library version

9.12.0

XCode and Swift version

Code 16.2, Swift 6, iOS Simulator 18.2

Platform the issue occurs on

iPhone, iPad & Mac Catalyst

Additional context

For the LDClient.start(config:context::startWaitSeconds:completion:), the completion is nillable, so by specifying nil, this call does not crash. But if you add a completion handler, it will hard crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions