Qt Multimedia 在 macOS 和 iOS 上的可用性

本页介绍Qt Multimedia 功能在 iOS 和 macOS 上的可用性。

限制

由于Qt Multimedia for iOS 使用摄像头和麦克风,因此项目文件中分配给 QMAKE_INFO_PLIST 的Info.plist 必须包含键NSCameraUsageDescriptionNSMicrophoneUsageDescription 。否则,应用程序将在启动时中止。有关此键的更多信息,请参阅 Apple 的Info.plist文档。

在 iOS 上使用 FFmpeg 库

在线安装程序中的 FFmpeg 二进制库必须嵌入到应用程序的捆绑包中。要嵌入这些库,可在应用程序的 CMakeLists.txt 文件中添加qt6_add_ios_ffmpeg_libraries()命令:

qt_add_ios_ffmpeg_libraries(mytarget)

使用 QMake 时,请在.pro 文件中添加以下内容:

CONFIG += add_ios_ffmpeg_libraries

注意: 在线安装程序中的 FFmpeg 二进制文件是为 arm64 和 arm64-simulator 构建的,以确保它们能通过 Apple Store Connect 的验证,并能在运行 iOS 模拟器时使用。

另请参阅 qt_add_ios_ffmpeg_libraries()

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.