Skip to content

Compiler warnings: using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead #247

@bobergj

Description

@bobergj

Is this a support request?
No

Describe the bug

Compiler warnings: "warning: using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead" when linking the LaunchDarkly Swift package.

To reproduce

  1. Add LaunchDarkly swift package to Xcode project
  2. import LaunchDarkly somewhere in app target
  3. Build the app the app target

Expected behavior
No compiler warnings from LaunchDarkly that pollute our build log

Logs

<censored>/SourcePackages/checkouts/ios-client-sdk/LaunchDarkly/LaunchDarkly/Networking/DarklyService.swift:15:35: warning: using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead

<censored>/checkouts/ios-client-sdk/LaunchDarkly/LaunchDarkly/Networking/DarklyService.swift:22:33: warning: using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead

SDK version
5.3.2, but the issues occur in the latest code as well:
https://github.com/launchdarkly/ios-client-sdk/blob/v5/LaunchDarkly/LaunchDarkly/Networking/DarklyService.swift#L15
https://github.com/launchdarkly/ios-client-sdk/blob/v5/LaunchDarkly/LaunchDarkly/Networking/DarklyService.swift#L22

Language version, developer tools
Xcode Version 12.5 (12E262)

OS/platform
macOS 11.2.3 (20D91)

Additional context
N/A

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