feat: add PrivacyInfo file to iOS framework

pull/25405/head
Vadim Levin 8 months ago
parent 06c1c7b5cb
commit 079e615fbd
  1. 31
      platforms/ios/PrivacyInfo.xcprivacy
  2. 6
      platforms/ios/build_framework.py

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>0A2A.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
</dict>
</plist>

@ -46,6 +46,9 @@ from cv_build_utils import execute, print_error, get_xcode_major, get_xcode_sett
IPHONEOS_DEPLOYMENT_TARGET='9.0' # default, can be changed via command line options or environment variable IPHONEOS_DEPLOYMENT_TARGET='9.0' # default, can be changed via command line options or environment variable
CURRENT_FILE_DIR = os.path.dirname(__file__)
class Builder: class Builder:
def __init__(self, opencv, contrib, dynamic, bitcodedisabled, exclude, disable, enablenonfree, targets, debug, debug_info, framework_name, run_tests, build_docs, swiftdisabled): def __init__(self, opencv, contrib, dynamic, bitcodedisabled, exclude, disable, enablenonfree, targets, debug, debug_info, framework_name, run_tests, build_docs, swiftdisabled):
self.opencv = os.path.abspath(opencv) self.opencv = os.path.abspath(opencv)
@ -477,6 +480,9 @@ class Builder:
s = os.path.join(*l[0]) s = os.path.join(*l[0])
d = os.path.join(framework_dir, *l[1]) d = os.path.join(framework_dir, *l[1])
os.symlink(s, d) os.symlink(s, d)
# Copy Apple privacy manifest
shutil.copyfile(os.path.join(CURRENT_FILE_DIR, "PrivacyInfo.xcprivacy"),
os.path.join(resdir, "PrivacyInfo.xcprivacy"))
def copy_samples(self, outdir): def copy_samples(self, outdir):
return return

Loading…
Cancel
Save