Project API and Dependency Scanner

English Version

Description

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/

Apple Resource

Usage

  1. Prerequisites: Ensure Python 3 is installed on your system.
  2. 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>
  3. Follow the prompts to choose whether to search for dependencies and whether to exclude any directories.

 

Input Prompts

  1. 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.
    1. Do you want to exclude certain directories? (y/n): If 'y' is selected, you will be prompted:
      1. 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.
  2. 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.
    1. Do you want to exclude certain directories? (y/n): If 'y' is selected, you will be prompted:
      1. Please enter the directories to exclude (separate with spaces): Mark the directories here that need to be excluded.
    2. 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.

 

Under the project:

  • 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/

Apple Resource

使用方法

  1. **前提條件:**確保系統上安裝了Python 3。
  2. 運行腳本:
    • 打開終端。
    • 導航至腳本所在目錄。
    • 使用以下命令運行腳本:
      python3 update_privacy_info.py <項目目錄路徑>
       
  3. 按提示操作選擇是否搜索套件以及是否排除任何目錄。

輸入提示

  1. 否要搜索API使用情況?(y/n):此項搜索旨在查找使用蘋果定義的NSPrivacyAccessedAPITypes接口的情況。
    1.  您是否要排除某些目錄?(y/n):若選擇'y',會提示:
      1. 請輸入要排除的目錄(用空格分隔):請在此處列出不需掃描的目錄,例如,Pods目錄下可能也包含了相關API的使用。
  2. 是否要搜索套件是否在列表中?(y/n):此項搜索目的是核查蘋果所列需提供PrivateInfo文件的第三方套件是否被使用。
    1. 您是否要排除某些目錄?(y/n):若選擇'y',將提示:
      1. 請輸入要排除的目錄(用空格分隔):在此處標明需排除的目錄。
    2. 是否要下載套件的privacy_info文件?(y/n):決定是否下載第三方套件的PrivateInfo文件,以便進行隱私信息審查。

產出資訊

 

位於專案底下會看到

  • 生成 PrivacyInfo檔案
  • 專案命名_<日期>.txt : 裡面會顯示使用API 情形&第三方套件情形
  • Deps_PrivacyInfos 資料夾:裡面會有有使用到的第三方套件 PrivacyInfo 檔案


套件Privacyinfo 來源

如果提供連結或 privateInfo 有不符合,再請告知修正

If the provided links or private information do not comply, please let us know for corrections.

套件名稱 來源
Abseil
AFNetworking
Alamofire
AppAuth
BoringSSL
openssl_grpc
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
image_picker_ios
IQKeyboardManager
IQKeyboardManagerSwift
Kingfisher
leveldb
Lottie
MBProgressHUD
nanopb
OneSignal
OneSignalCore
OneSignalExtension
OneSignalOutcomes
OpenSSL
OrderedSet
package_info
package_info_plus
path_provider
path_provider_ios
Promises
Protobuf
Reachability
RealmSwift
RxCocoa
RxRelay
RxSwift
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