Skip to content

Latest commit

 

History

History
115 lines (77 loc) · 2.65 KB

File metadata and controls

115 lines (77 loc) · 2.65 KB

App Analyzer Plugin for Bitrise CLI

A powerful tool for analyzing iOS app bundles, providing detailed insights about size, content, and potential optimizations.

Installation

Can be run directly with the Bitrise CLI.

bitrise plugin install https://github.com/birmacher/bitrise-plugins-analyze.git

Usage

The plugin provides two main commands: analyze and diff.

Analyze Command

Analyzes an app bundle and provides detailed insights about its size and content.

bitrise :analyze [path] [flags]

Arguments

  • path: Path to the app bundle (.app), archive (.xcarchive), or IPA file (.ipa)

Flags

  • --html: Generate an interactive HTML visualization report
  • --json: Generate a detailed JSON report
  • --markdown: Generate a markdown report with key insights
  • --output-dir: Directory where the output files will be generated (default: current directory)

Output Files

All generated files will use the app's bundle ID as the base filename:

  • HTML report: <bundle_id>.html
  • JSON report: <bundle_id>.json
  • Markdown report: <bundle_id>.md

Examples

  1. Basic analysis of an .app bundle:
bitrise :analyze MyApp.app
  1. Generate HTML visualization:
bitrise :analyze MyApp.ipa --html
  1. Generate all report formats:
bitrise :analyze MyApp.xcarchive --html --json --markdown
  1. Specify output directory:
bitrise :analyze MyApp.app --html --output-dir=/path/to/reports

Diff Command

Compares two JSON analysis reports to identify file changes between app versions.

bitrise :diff [old.json] [new.json] [flags]

Arguments

  • old.json: Path to the JSON report of the old app version
  • new.json: Path to the JSON report of the new app version

Flags

  • --json: Path to save the diff results as a JSON file

Output

The diff command identifies and reports:

  • Added files (with sizes)
  • Removed files (with sizes)
  • Changed files (with size comparisons)

Examples

  1. Compare two JSON reports:
bitrise :diff old.json new.json
  1. Save diff results to a JSON file:
bitrise :diff old.json new.json --json=diff.json

Requirements

  • macOS (required for iOS app bundle analysis)
  • Bitrise CLI installed
  • For analyzing .ipa files: ability to extract and process iOS app bundles
  • For analyzing Android images: the cwebp command must be installed

Environment Variables

  • PYTHON_BIN: Path to the Python interpreter used to create the temporary virtual environment. Defaults to python3.

License

This project is licensed under the MIT License - see the LICENSE file for details.