Skip to content

Xcode 27 Beta deprecation error #1037

@elliot-garner

Description

@elliot-garner

Describe the bug

The LKObjCHelpers Objective-C target fails to compile against the iOS 27 SDK. Its public header references RPBroadcastSampleHandler (ReplayKit), which Apple deprecated in iOS 27:

// Sources/LKObjCHelpers/include/LKObjCHelpers.h
+ (void)finishBroadcastWithoutError:(RPBroadcastSampleHandler *)handler
    API_AVAILABLE(ios(10.0), macCatalyst(13.1), macos(11.0), tvos(10.0));

Because the module is built with -Werror in effect, the -Wdeprecated-declarations warning is promoted to an error and the precompiled module (.pcm) fails to emit, breaking the entire build of any project that depends on LiveKit:

LKObjCHelpers.h:6:38: error: 'RPBroadcastSampleHandler' is deprecated:
    first deprecated in iOS 27.0 - No longer supported
<unknown>:0: error: failed to emit precompiled module
    '.../LKObjCHelpers-XXXX.pcm' for module map '.../LKObjCHelpers.modulemap'

The header has no availability/deprecation guard or diagnostic pragma around this declaration. The header on the main branch (through release 2.14.1) is still unguarded, so the latest release is also affected.

SDK Version

client-sdk-swift 2.10.2

iOS/macOS Version

iOS 27.0 SDK.

Xcode Version

Xcode 27.0 beta, Build 27A5194q.

Steps to Reproduce

  1. Add client-sdk-swift (any version up to 2.14.1) as a dependency.
  2. Select Xcode 27.0 beta with the iOS 27 SDK.
  3. Build for an iOS Simulator destination.
  4. Build fails while generating the LKObjCHelpers precompiled module with the deprecation error above.

Logs

SwiftExplicitDependencyGeneratePcm arm64 .../LKObjCHelpers-XXXX.pcm
.../checkouts/client-sdk-swift/Sources/LKObjCHelpers/include/LKObjCHelpers.h:6:38:
    error: 'RPBroadcastSampleHandler' is deprecated: first deprecated in iOS 27.0 - No longer supported
<unknown>:0: error: failed to emit precompiled module
    '.../SwiftExplicitPrecompiledModules/LKObjCHelpers-XXXX.pcm'
    for module map '.../GeneratedModuleMaps-iphonesimulator/LKObjCHelpers.modulemap'

Failing frontend invocation: swift-frontend -emit-pcm -module-name LKObjCHelpers ... -sdk .../iPhoneSimulator27.0.sdk -target arm64-apple-ios17.6-simulator -clang-target arm64-apple-ios27.0-simulator -Xcc -Werror ... (the -Xcc -Werror is what promotes the deprecation to an error).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions