azure-sdk-for-ios: [BUG] Xcode 16.3 compilation error: '==' operator in RequestStringConvertible triggers "'Self' required" error

Describe the bug When building the Azure SDK for iOS using Xcode 16.3, the following compile-time error occurs in the RequestStringConvertible protocol extension:

Member operator '==' must have at least one argument of type 'Self'

This error occurs due to Xcode 16.3 enforcing a rule that operator overloads in protocol extensions must include Self as a parameter type. The current implementation uses the protocol type directly.

Exception or Stack Trace

Member operator '==' must have at least one argument of type 'Self'

To Reproduce Steps to reproduce the behavior:

  1. Open the Azure SDK for iOS in Xcode 16.3.
  2. Build the project.
  3. Observe the compiler error in RequestStringConvertible.

Code Snippet

public extension RequestStringConvertible {
    static func == (lhs: RequestStringConvertible, rhs: RequestStringConvertible) -> Bool {
        return lhs.requestString == rhs.requestString
    }
}

Proposed fix (already submitted in PR #2070 ):

static func == (lhs: Self, rhs: Self) -> Bool {
    return lhs.requestString == rhs.requestString
}

Expected behavior The project should compile without error on Xcode 16.3.

Screenshots Image

Setup (please complete the following information):

  • OS: iOS 18.4
  • IDE : Xcode 16.3 (16E140)
  • AzureCommunicationCalling_2.15.1

Additional context This change is in line with SE-0091. The fix is proposed in PR #2070

Information Checklist

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 16 (14 by maintainers)

Most upvoted comments

Got it. We are preparing a fix for AzureCore (https://github.com/Azure/azure-sdk-for-ios/pull/2074) but it will require an update to ACS Common (and probably Calling?) to ingest.

@tjprescott We do not directly have a dependency on AzureCore but its AzureCommunicationCommon that depends on AzureCore

Hi @tjprescott @raosanat,

Could you please let us know if there’s an estimated release date for those packages?

Thanks in advance for your help.

I ran into the same issue in Xcode 16.3.

@mattials a new version of Chat has been released that should unblock you.

@yannisalexiou @mattials can you share your dependencies (podspec, package.swift, etc.)? If you are using AzureCommunicationCalling it should not be pulling in AzureCore, direclty or indirectly, as AzureCommunicationCommon does not have a dependency on it.

i ran into same issue, waiting for changes in AzureCommunicationCommon and AzureCommunicationUICalling

AzureCore 1.0.0-beta.16 is released.

@raosanat a new release of AzureCommunicationCommon and AzureCommunicationCalling is necessary to actually resolve this issue. Can you help facilitate this?