diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index 4031dad39b1..3535f41a3be 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -329,6 +329,7 @@ if(APPLE)
set(platform_shortname "ios")
endif()
+ # Info.plist
qt_copy_or_install(FILES "cmake/${platform_shortname}/Info.plist.app.in"
DESTINATION "${__GlobalConfig_install_dir}/${platform_shortname}"
)
@@ -337,6 +338,15 @@ if(APPLE)
DESTINATION "${__GlobalConfig_build_dir}/${platform_shortname}"
)
+ # Privacy manifest
+ qt_copy_or_install(FILES "cmake/${platform_shortname}/PrivacyInfo.xcprivacy"
+ DESTINATION "${__GlobalConfig_install_dir}/${platform_shortname}"
+ )
+ # For examples built as part of prefix build before install
+ file(COPY "cmake/${platform_shortname}/PrivacyInfo.xcprivacy"
+ DESTINATION "${__GlobalConfig_build_dir}/${platform_shortname}"
+ )
+
if(IOS)
qt_copy_or_install(FILES "cmake/ios/LaunchScreen.storyboard"
DESTINATION "${__GlobalConfig_install_dir}/ios"
diff --git a/cmake/QtBuildHelpers.cmake b/cmake/QtBuildHelpers.cmake
index adaa107cba0..847c0d20281 100644
--- a/cmake/QtBuildHelpers.cmake
+++ b/cmake/QtBuildHelpers.cmake
@@ -131,6 +131,10 @@ macro(qt_internal_set_apple_archiver_flags)
endif()
endmacro()
+macro(qt_internal_set_apple_privacy_manifest target manifest_file)
+ set_target_properties(${target} PROPERTIES _qt_privacy_manifest "${manifest_file}")
+endmacro()
+
macro(qt_internal_set_debug_extend_target)
option(QT_CMAKE_DEBUG_EXTEND_TARGET "Debug extend_target calls in Qt's build system" OFF)
endmacro()
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 602720cebfa..a4fa66c037f 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -911,6 +911,22 @@ set(QT_ALLOW_MISSING_TOOLS_PACKAGES TRUE)")
qt_add_list_file_finalizer(qt_finalize_module ${target} ${arg_INTERNAL_MODULE} ${arg_NO_PRIVATE_MODULE})
endfunction()
+function(qt_internal_apply_apple_privacy_manifest target)
+ if(APPLE)
+ # Privacy manifest
+ get_target_property(is_framework ${target} FRAMEWORK)
+ if(is_framework)
+ get_target_property(privacy_manifest ${target} _qt_privacy_manifest)
+ if(NOT privacy_manifest)
+ set(privacy_manifest
+ "${__qt_internal_cmake_apple_support_files_path}/PrivacyInfo.xcprivacy")
+ endif()
+ target_sources("${target}" PRIVATE "${privacy_manifest}")
+ set_property(TARGET "${target}" APPEND PROPERTY RESOURCE "${privacy_manifest}")
+ endif()
+ endif()
+endfunction()
+
function(qt_finalize_module target)
qt_internal_collect_module_headers(module_headers ${target})
@@ -934,6 +950,7 @@ function(qt_finalize_module target)
qt_generate_prl_file(${target} "${INSTALL_LIBDIR}")
qt_generate_module_pri_file("${target}" ${ARGN})
qt_internal_generate_pkg_config_file(${target})
+ qt_internal_apply_apple_privacy_manifest(${target})
endfunction()
# Get a set of Qt module related values based on the target.
diff --git a/cmake/ios/PrivacyInfo.xcprivacy b/cmake/ios/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000000..d75908da058
--- /dev/null
+++ b/cmake/ios/PrivacyInfo.xcprivacy
@@ -0,0 +1,14 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+ NSPrivacyAccessedAPITypes
+
+
+
diff --git a/cmake/macos/PrivacyInfo.xcprivacy b/cmake/macos/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000000..96aff954eaa
--- /dev/null
+++ b/cmake/macos/PrivacyInfo.xcprivacy
@@ -0,0 +1,12 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+
+
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index 28d97c06994..e03863e069a 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -1442,6 +1442,11 @@ if(APPLE AND QT_FEATURE_framework AND QT_FEATURE_separate_debug_info)
)
endif()
+if(IOS)
+ qt_internal_set_apple_privacy_manifest(Core
+ "${CMAKE_CURRENT_SOURCE_DIR}/platform/ios/PrivacyInfo.xcprivacy")
+endif()
+
set(linker_script_contents "")
if (QT_NAMESPACE STREQUAL "")
set(tag_symbol "qt_version_tag")
diff --git a/src/corelib/platform/ios/PrivacyInfo.xcprivacy b/src/corelib/platform/ios/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000000..5f84a229a57
--- /dev/null
+++ b/src/corelib/platform/ios/PrivacyInfo.xcprivacy
@@ -0,0 +1,31 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryFileTimestamp
+ NSPrivacyAccessedAPITypeReasons
+
+ 0A2A.1
+
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryDiskSpace
+ NSPrivacyAccessedAPITypeReasons
+
+ 85F4.1
+
+
+
+
+
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 7015e1e82fc..70bbfc7a6bc 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -1032,4 +1032,9 @@ qt_internal_add_docs(Gui
doc/qtgui.qdocconf
)
+if(IOS)
+ qt_internal_set_apple_privacy_manifest(Gui
+ "${CMAKE_CURRENT_SOURCE_DIR}/platform/ios/PrivacyInfo.xcprivacy")
+endif()
+
qt_internal_add_optimize_full_flags()
diff --git a/src/gui/platform/ios/PrivacyInfo.xcprivacy b/src/gui/platform/ios/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000000..bde2b167c75
--- /dev/null
+++ b/src/gui/platform/ios/PrivacyInfo.xcprivacy
@@ -0,0 +1,23 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategorySystemBootTime
+ NSPrivacyAccessedAPITypeReasons
+
+ 35F9.1
+
+
+
+
+
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index f77117dc563..2ba8e4719a7 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -911,6 +911,11 @@ qt_internal_add_docs(Widgets
doc/qtwidgets.qdocconf
)
+if(IOS)
+ qt_internal_set_apple_privacy_manifest(Widgets
+ "${CMAKE_CURRENT_SOURCE_DIR}/platform/ios/PrivacyInfo.xcprivacy")
+endif()
+
# include the snippet projects for developer-builds
if(QT_FEATURE_private_tests)
add_subdirectory(doc/snippets/customviewstyle)
diff --git a/src/widgets/platform/ios/PrivacyInfo.xcprivacy b/src/widgets/platform/ios/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000000..819b868e1a7
--- /dev/null
+++ b/src/widgets/platform/ios/PrivacyInfo.xcprivacy
@@ -0,0 +1,25 @@
+
+
+
+
+ NSPrivacyTracking
+
+ NSPrivacyCollectedDataTypes
+
+ NSPrivacyTrackingDomains
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryFileTimestamp
+ NSPrivacyAccessedAPITypeReasons
+
+ DDA9.1
+ C617.1
+ 3B52.1
+
+
+
+
+