Skip to content
プロジェクト

Wooder/ios_17_required_reason_api_scanner

GitHubで見る

Wooder/ios_17_required_reason_api_scanner has 646 GitHub stars and 36 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-25 07:42 UTC. Last push 2024-05-06.

この数値の測り方

計測したスター増加

24時間
0
7日間
-1
15日間
履歴を収集中
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

概要

XcodeのSwiftプロジェクトでRequired Reason APIの使用状況をスキャンするシンプルなシェルスクリプト集。プライバシー要件への準拠を確認し、プライバシーマニフェストの作成を簡略化できます。

セキュリティ

Scanners for possible use of "iOS required reason API".

Text-based scanner

The scan is very rudimentary and based on comparing strings, but should be very helpful for a first analysis.

See https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api for details.

Usage:

sh required_reason_api_text_scanner.sh {directory_name}

Example Output:

Found potentially required reason API usage 'UserDefaults' in './ViewController.swift' Line numbers: 28

See the following medium post for more details: https://jochen-holzer.medium.com/embrace-the-evolution-preparing-your-ios-app-for-the-required-reason-api-38f2d12bbce5?source=friends_link&sk=d146c22f3e18c6551231f4b55c934b05

Faster ripgrep-based text scanner

This scan should produce similar results to the text-based scanner, but using ripgrep for faster results, particularly useful for medium to large repositories - where the text scanner will take several minutes to complete, this scanner should still complete in a matter of seconds.

Usage:

With ripgrep installed, e.g. brew install ripgrep,

sh ripgrep_required_reason_api_text_scanner.sh {directory_name}

Output displays in the standard format of grep.

Binary-based scanner

This scanner looks for symbols in the binaries in DerivedData folder using nm.

It will find the .app, .framework and .a binaries. Keep in mind that the symbols found in the app (.app) will be duplicated from the ones found in the static libraries .a since they are statically linked.

Usage: sh required_reason_api_binary_scanner.sh {directory}

Example output:

sh required_reason_api_binary_scanner.sh \
~/Library/Developer/Xcode/DerivedData/DemoSymbols-aymfeypsyhqwfuaieijkrqdeohcd/Build/Products/Debug-iphonesimulator

> Analyzing binaries: ./DemoSymbols.app/DemoSymbols
> ---
> Used symbols in binary ./DemoSymbols.app/DemoSymbols: activeInputModes, fgetattrlist, fstat, fstatat, fstatfs, fstatvfs, getattrlist, getattrlistat, getattrlistbulk, lstat, mach_absolute_time, NSFileCreationDate, NSFileModificationDate, NSFileSystemFreeSize, NSFileSystemSize, NSURLContentModificationDateKey, NSURLCreationDateKey, NSURLVolumeAvailableCapacityForImportantUsageKey, NSURLVolumeAvailableCapacityForOpportunisticUsageKey, NSURLVolumeAvailableCapacityKey, NSURLVolumeTotalCapacityKey, NSUserDefaults, stat, statfs, statvfs, systemUptime

Example project

In the directory DemoSymbols you will find a project that uses all the code that Apple asks for a required reason.

It is used to test these scanners.

関連プロジェクトを探す

読み込み中…