This script scans a specified project directory for API usage and dependencies, updates or creates a PrivacyInfo.xcprivacy
file, and generates a text report of the findings.
If you are using a non-UTF-8 environment, please download update_privacy_info_without_UTF8.py. Additionally, since the chardet Python package is used for encoding detection, you need to install it before use by following the instructions at: https://www.geeksforgeeks.org/how-to-install-python-chardet-on-macos/
- https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/
- https://developer.apple.com/support/third-party-SDK-requirements/
- Prerequisites: Ensure Python 3 is installed on your system.
- Running the script:
- Open a terminal.
- Navigate to the script's directory.
- Run the script using the command:
python3 update_privacy_info.py <path-to-your-project-directory>
- Follow the prompts to choose whether to search for dependencies and whether to exclude any directories.
- Do you want to search for API usage? (y/n): This search is aimed at finding cases where the NSPrivacyAccessedAPITypes interface defined by Apple is used.
- Do you want to exclude certain directories? (y/n): If 'y' is selected, you will be prompted:
- Please enter the directories to exclude (separate with spaces): List the directories here that do not need to be scanned, for example, the Pods directory may also contain the use of related APIs.
- Do you want to exclude certain directories? (y/n): If 'y' is selected, you will be prompted:
- Do you want to search if the package is in the list? (y/n): The purpose of this search is to verify whether the third-party packages listed by Apple that require a PrivateInfo document are used.
- Do you want to exclude certain directories? (y/n): If 'y' is selected, you will be prompted:
- Please enter the directories to exclude (separate with spaces): Mark the directories here that need to be excluded.
- Do you want to download the privacy_info file of the package? (y/n): Decide whether to download the PrivateInfo document of third-party packages for privacy information review.
- Do you want to exclude certain directories? (y/n): If 'y' is selected, you will be prompted:
- Generating PrivacyInfo file
- ProjectName_<Date>.txt: Inside, it will display the usage ofAPIs & the situation with third-party packages.
- Deps_PrivacyInfos folder: Inside, there will be PrivacyInfo files of the third-party packages us
此腳本掃描指定的項目目錄,是否有使用Apple 列出需要註記API和列出套件,更新或創建PrivacyInfo.xcprivacy
文件,並生成搜索結果的文本報告。
如果你使用非 UTF-8 環境請下載update_privacy_info_without_UTF8.py,並且由於有用到chardet 這個 python 套件進行搜索編碼,
需要在使用前先加入 :https://www.geeksforgeeks.org/how-to-install-python-chardet-on-macos/
- https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/
- https://developer.apple.com/support/third-party-SDK-requirements/
- **前提條件:**確保系統上安裝了Python 3。
- 運行腳本:
- 打開終端。
- 導航至腳本所在目錄。
- 使用以下命令運行腳本:
python3 update_privacy_info.py <項目目錄路徑>
- 按提示操作選擇是否搜索套件以及是否排除任何目錄。
- 否要搜索API使用情況?(y/n):此項搜索旨在查找使用蘋果定義的NSPrivacyAccessedAPITypes接口的情況。
- 您是否要排除某些目錄?(y/n):若選擇'y',會提示:
- 請輸入要排除的目錄(用空格分隔):請在此處列出不需掃描的目錄,例如,Pods目錄下可能也包含了相關API的使用。
- 您是否要排除某些目錄?(y/n):若選擇'y',會提示:
- 是否要搜索套件是否在列表中?(y/n):此項搜索目的是核查蘋果所列需提供PrivateInfo文件的第三方套件是否被使用。
- 您是否要排除某些目錄?(y/n):若選擇'y',將提示:
- 請輸入要排除的目錄(用空格分隔):在此處標明需排除的目錄。
- 是否要下載套件的privacy_info文件?(y/n):決定是否下載第三方套件的PrivateInfo文件,以便進行隱私信息審查。
- 您是否要排除某些目錄?(y/n):若選擇'y',將提示:
位於專案底下會看到
- 生成 PrivacyInfo檔案
- 專案命名_<日期>.txt : 裡面會顯示使用API 情形&第三方套件情形
- Deps_PrivacyInfos 資料夾:裡面會有有使用到的第三方套件 PrivacyInfo 檔案
如果提供連結或 privateInfo 有不符合,再請告知修正
If the provided links or private information do not comply, please let us know for corrections.
套件名稱 | 來源 |
Abseil
|
|
AFNetworking
|
|
Alamofire
|
|
AppAuth
|
|
BoringSSL
|
No,Github:https://github.com/google/boringssl
|
openssl_grpc
|
No,Github:openssl/openssl#23262
|
Capacitor
|
|
Charts
|
|
connectivity_plus
|
|
Cordova
|
|
device_info_plus
|
|
DKImagePickerController
|
|
DKPhotoGallery
|
|
FBAEMKit
|
|
FBLPromises
|
|
FBSDKCoreKit
|
|
FBSDKCoreKit_Basics
|
|
FBSDKLoginKit
|
|
FBSDKShareKit
|
|
file_picker
|
|
FirebaseABTesting
|
|
FirebaseAuth
|
|
FirebaseCore
|
|
FirebaseCoreDiagnostics
|
No,Github:
|
FirebaseCoreExtension
|
|
FirebaseCoreInternal
|
|
FirebaseCrashlytics
|
|
FirebaseDynamicLinks
|
|
FirebaseFirestore
|
|
FirebaseInstallations
|
|
FirebaseMessaging
|
|
FirebaseRemoteConfig
|
|
Flutter
|
|
flutter_inappwebview
|
|
flutter_local_notifications
|
|
fluttertoast
|
|
FMDB
|
|
geolocator_apple
|
|
GoogleDataTransport
|
|
GoogleSignIn
|
|
GoogleToolboxForMac
|
|
GoogleUtilities
|
|
grpcpp
|
|
GTMAppAuth
|
|
GTMSessionFetcher
|
|
hermes
|
No,GitHub:https://github.com/facebook/hermes
|
image_picker_ios
|
|
IQKeyboardManager
|
|
IQKeyboardManagerSwift
|
|
Kingfisher
|
|
leveldb
|
No,GitHub:https://github.com/google/leveldb
|
Lottie
|
|
MBProgressHUD
|
|
nanopb
|
|
OneSignal
|
|
OneSignalCore
|
|
OneSignalExtension
|
|
OneSignalOutcomes
|
|
OpenSSL
|
No,GitHub:https://github.com/openssl/openssl
|
OrderedSet
|
No,GitHub:https://github.com/Weebly/OrderedSet
|
package_info
|
No,GitHub:https://github.com/flutter/plugins
|
package_info_plus
|
|
path_provider
|
|
path_provider_ios
|
|
Promises
|
|
Protobuf
|
|
Reachability
|
|
RealmSwift
|
|
RxCocoa
|
No,GitHub:ReactiveX/RxSwift#2567
|
RxRelay
|
No,GitHub:ReactiveX/RxSwift#2567
|
RxSwift
|
No,GitHub:ReactiveX/RxSwift#2567
|
SDWebImage
|
|
share_plus
|
|
shared_preferences_ios
|
|
SnapKit
|
|
sqflite
|
|
Starscream
|
|
SVProgressHUD
|
|
SwiftyGif
|
|
SwiftyJSON
|
|
Toast
|
|
UnityFramework
|
No,GitHub:
|
url_launcher
|
|
url_launcher_ios
|
|
video_player_avfoundation
|
|
wakelock
|
|
webview_flutter_wkwebview
|