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
Open the Xcode project (attached below as TwilioTest.zip) in Xcode 15.
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.
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 withAVCaptureVideoOrientation
being deprecated in iOS 17.0 and newer.The warnings look like the following when using TwilioVideo with Swift Package Manager:
More specifically, the warnings are associated with the following public protocols:
TVICameraSourceOrientationDelegate
TVICameraSourceOrientationTracker
TVIUserInterfaceTracker
Steps to Reproduce
TwilioTest.zip
) in Xcode 15.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
iOS Version
17.0 and newer
iOS Device
Any