Skip to content

[BUG] AzureCommunicationCalling umbrella header imports generated -Swift.h from transitive dependency #2432

Description

Describe the bug

The AzureCommunicationCalling.framework umbrella header (AzureCommunicationCalling.h:9) contains a direct import of a compiler-generated Swift bridging header from a separate framework:

#import <AzureCommunicationCommon/AzureCommunicationCommon-Swift.h>

This -Swift.h file is a build artifact generated by the Swift compiler during compilation. Any tooling that attempts to parse AzureCommunicationCalling's public headers outside of Xcode fails with:

fatal error: 'AzureCommunicationCommon/AzureCommunicationCommon-Swift.h' file not found

To Reproduce

I used Kotlin Multiplatform's SwiftPM import (reproducible with any non-Xcode toolchain that parses framework headers via Clang) to consume AzureCommunicationCalling via SwiftPM:

kotlin {
    listOf(
        iosArm64(),
        iosSimulatorArm64()
    ).forEach { iosTarget ->
        iosTarget.binaries.framework {
            baseName = "MyApp"
            isStatic = true
        }
    }

    swiftPMDependencies {
        iosMinimumDeploymentTarget.set("16.0")

        swiftPackage(
            url = url("https://github.com/Azure/SwiftPM-AzureCommunicationCalling.git"),
            version = exact("2.18.1"),
            products = listOf(product("AzureCommunicationCalling")),
        )
    }
}

Running the build produces:

> Task :composeApp:cinteropSwiftPMImportIosSimulatorArm64
java.lang.Error: AzureCommunicationCalling:
.../AzureCommunicationCalling.framework/Headers/AzureCommunicationCalling.h:9:9:
fatal error: 'AzureCommunicationCommon/AzureCommunicationCommon-Swift.h' file not found

Expected behavior

The SwiftPM package AzureCommunicationCalling should be consumable by any standard toolchain that supports Clang modules, not only Xcode.

Root cause

Exposing a -Swift.h generated bridging header in a framework's public umbrella header is an anti-pattern. The -Swift.h file is:

  • Generated at compile time, not shipped as a stable artifact
  • Only discoverable by Xcode's build system, which knows how to wire up header search paths for sibling SwiftPM-built frameworks
  • Not resolvable by any other toolchain (Clang CLI, Kotlin/Native cinterop, Buck, Bazel, etc...)

Suggested fix

Any of the following would resolve the issue:

  1. Use proper Clang module maps instead of direct header imports for transitive dependencies. Declare AzureCommunicationCommon as a module dependency so standard module-aware toolchains can resolve it.
  2. Define stable Objective-C interfaces/protocols in proper .h files and keep the Swift-to-ObjC bridging internal to the framework.
  3. *Bundle the required headers from AzureCommunicationCommon within the AzureCommunicationCalling framework if those types are part of the public API surface.

Setup

  • macOS: Tahoe 26.x
  • Xcode: 26.x
  • Kotlin: 2.4.0-Beta1 with experimental SwiftPM import
  • AzureCommunicationCalling version: 2.18.1 (via SwiftPM-AzureCommunicationCalling)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Communicationcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions