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:
- 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.
- Define stable Objective-C interfaces/protocols in proper
.h files and keep the Swift-to-ObjC bridging internal to the framework.
- *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)
Describe the bug
The
AzureCommunicationCalling.frameworkumbrella header (AzureCommunicationCalling.h:9) contains a direct import of a compiler-generated Swift bridging header from a separate framework:This
-Swift.hfile is a build artifact generated by the Swift compiler during compilation. Any tooling that attempts to parseAzureCommunicationCalling's public headers outside of Xcode fails with:To Reproduce
I used Kotlin Multiplatform's SwiftPM import (reproducible with any non-Xcode toolchain that parses framework headers via Clang) to consume
AzureCommunicationCallingvia 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:
Expected behavior
The SwiftPM package
AzureCommunicationCallingshould be consumable by any standard toolchain that supports Clang modules, not only Xcode.Root cause
Exposing a
-Swift.hgenerated bridging header in a framework's public umbrella header is an anti-pattern. The-Swift.hfile is:Suggested fix
Any of the following would resolve the issue:
AzureCommunicationCommonas a module dependency so standard module-aware toolchains can resolve it..hfiles and keep the Swift-to-ObjC bridging internal to the framework.AzureCommunicationCommonwithin theAzureCommunicationCallingframework if those types are part of the public API surface.Setup
SwiftPM-AzureCommunicationCalling)