Mobile Development 16 min read

How to Optimize iOS App Size with the Open‑Source APPAnalyze Tool

This article introduces APPAnalyze, an open‑source script that scans iOS .ipa binaries to automatically detect package‑size problems, generates detailed size reports, and provides configurable rules and fixes to help developers efficiently reduce app bundle size.

JD Cloud Developers
JD Cloud Developers
JD Cloud Developers
How to Optimize iOS App Size with the Open‑Source APPAnalyze Tool

Background

APPAnalyze is a script tool for analyzing iOS .ipa packages. It automatically scans for package‑size issues and generates data for inspection, helping developers efficiently optimize bundle size. The team has used it internally for a long time.

Implementation

The tool scans binary libraries without requiring source code. The overall workflow is illustrated below.

APPAnalyze workflow
APPAnalyze workflow
Note: The component‑based scanning mode is currently internal‑only.

Usage Guide

Installation

No installation is required. Download the executable APPAnalyzeCommand from the GitHub releases page.

Download link: https://github.com/helele90/APPAnalyze/releases

Command‑Line Options

$ /Users/Test/APPAnalyzeCommand --help
OPTIONS:
--version <version>     Current version 1.0.0
--output <output>       Output directory (required)
--config <config>       Path to configuration JSON (optional)
--ipa <ipa>             Path to .ipa.app file (required)
-h, --help              Show help information.

Execution

Run the command with the --ipa and --output arguments to generate size data and issue reports. Use a Debug build rather than an App Store package.

Tip: If you encounter “permission denied”, run sudo chmod -R 777 /path/to/APPAnalyzeCommand .
/Users/Test/APPAnalyzeCommand --ipa ipas/JDAPP/JDAPP.app --output ipas/JDAP

Generated Artifacts

The output folder contains the following files:

app_size.html – shows size per framework; open in a browser.

framework_size.html – detailed size per individual framework (do not open directly).

package_size.json – raw JSON size data.

app_issues.html – number of size‑related issues per framework.

framework_issues.html – detailed issue data per framework (do not open directly).

issues.json – JSON list of all detected issues.

These files can be used to build custom dashboards or compare different app versions.

Scanning Rules Overview

APPAnalyze provides a rich set of rules, each with detection criteria and suggested fixes. Key rule categories include:

Unused Objective‑C classes and Swift classes.

Unused Objective‑C protocols.

Duplicate resources and files (MD5 match).

Large resources (default >20 KB).

Unused ImageSet/DataSet assets.

Dynamic ObjC class calls via NSClassFromString.

Incorrect ObjC property memory attributes.

Conflicting or duplicate Category methods.

Unimplemented required ObjC protocol methods.

Each rule lists scanning patterns and optional remediation steps such as removing unused code, consolidating resources, or correcting property declarations.

Quality and Comparison

After a year of internal use, the tool has helped fix dozens of component size issues with a low false‑positive rate. Compared with similar open‑source tools, APPAnalyze offers better extensibility, full size‑data generation, and higher scan accuracy.

Open‑Source Plan

The project will be open‑sourced once internal restructuring is complete. Open‑sourcing will enable teams to extend the scanner, add custom rules, and generate additional data formats.

Future Roadmap

Support for component‑based projects and custom scanning pipelines.

Improved Swift analysis, including unused properties and methods.

Additional configurable rules and output formats.

Related Links

GitHub repository: https://github.com/helele90/APPAnalyze

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Mobile DevelopmentiOSopen sourceapp size optimization
JD Cloud Developers
Written by

JD Cloud Developers

JD Cloud Developers (Developer of JD Technology) is a JD Technology Group platform offering technical sharing and communication for AI, cloud computing, IoT and related developers. It publishes JD product technical information, industry content, and tech event news. Embrace technology and partner with developers to envision the future.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.