Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public protocols rely on AVFoundation type deprecated in iOS 17.0 #273

Open
patrickhartling opened this issue Jul 8, 2024 · 1 comment

Comments

@patrickhartling
Copy link

Description

If a consumer of the framework has their deployment target set to iOS 17.0 or newer, the Swift compiler will report deprecation warnings from TVICameraSourceOrientationTracker.h. These are associated with AVCaptureVideoOrientation being deprecated in iOS 17.0 and newer.

The warnings look like the following when using TwilioVideo with Swift Package Manager:

/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphoneos/TwilioVideo.framework/Headers/TVICameraSourceOrientationTracker.h:28:38 'AVCaptureVideoOrientation' is deprecated: first deprecated in iOS 17.0 - Use AVCaptureDeviceRotationCoordinator instead

'AVCaptureVideoOrientation' has been explicitly marked deprecated here
In file included from <module-includes>:1:
In file included from /.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphoneos/TwilioVideo.framework/Headers/TwilioVideo.h:22:

/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphoneos/TwilioVideo.framework/Headers/TVICameraSourceOrientationTracker.h:51:41 'AVCaptureVideoOrientation' is deprecated: first deprecated in iOS 17.0 - Use AVCaptureDeviceRotationCoordinator instead

'AVCaptureVideoOrientation' has been explicitly marked deprecated here
In file included from <module-includes>:1:
In file included from /.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphoneos/TwilioVideo.framework/Headers/TwilioVideo.h:22:

/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphoneos/TwilioVideo.framework/Headers/TVICameraSourceOrientationTracker.h:71:41 'AVCaptureVideoOrientation' is deprecated: first deprecated in iOS 17.0 - Use AVCaptureDeviceRotationCoordinator instead

'AVCaptureVideoOrientation' has been explicitly marked deprecated here

More specifically, the warnings are associated with the following public protocols:

  • TVICameraSourceOrientationDelegate
  • TVICameraSourceOrientationTracker
  • TVIUserInterfaceTracker

Steps to Reproduce

  1. Open the Xcode project (attached below as TwilioTest.zip) in Xcode 15.
  2. Build the project.

Code

TwilioTest.zip

Expected Behavior

I would not expect the Swift compiler to emit deprecation warning from a dependency, particularly when the dependency has a deployment target set wherein the deprecation warning does not apply. However, that is not how things work today with Swift.

Actual Behavior

The warnings shown above are reported and cannot be addressed by the user of the framework. Any implementation of one of the protocols involved will also result in deprecation warnings being reported.

Reproduces How Often

Always.

Logs

N/A

Versions

macOS Sonoma 14.5

Video iOS SDK

5.5.0 through 5.8.2 via Swift Package Manager

Xcode

  • Xcode 15.4
  • Xcode 16.0 beta 2

iOS Version

17.0 and newer

iOS Device

Any

@diederikh
Copy link

diederikh commented Sep 19, 2024

Same issue here. Seems to be related to enabling Explicitly built Modules build setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants