Duplicate Resources

iOS & Android

Identical files appearing multiple times, detected via SHA-256 hashing with smart filtering to separate structural duplicates from actionable ones.

Identical files appearing multiple times within the app bundle, detected via SHA-256 content hashing. The inspector applies 9 intelligent filtering rules to distinguish between legitimate duplication (structurally required by iOS) and actionable duplication (developer-fixable waste). Legitimate duplicates like per-bundle Info.plists, NIB version variants, Asset Catalog metadata, and per-framework modules are filtered out automatically.


Why this happens

  • Extension duplication. Resources duplicated between the main app and extensions, or across multiple extensions. This is the single largest source of actionable duplication.

  • Same-bundle asset duplication. Identical images, sounds, or data files at different paths within the same app bundle, typically from developer error or multiple SDKs bundling the same resource.

  • SPM copies resources into each target by default, causing duplication across app and extension targets.


Size impact

Extension duplication is often the dominant source of actionable waste. Severity is based on per-file size: High (>500 KB), Medium (100-500 KB), Low (<100 KB).

Pinterest

Localization duplication: ~30% of total app size (50 MB savings)

Proton VPN

Asset catalog duplicated 3x across targets: ~105 MB

PhotonCam

One extension nearly doubled bundle size

LinkedIn

7.4 MB icon bundle duplicated in NotificationServiceExtension


How we detect it

Computes SHA-256 hashes for all files and groups by content hash. Applies 9 filtering rules to exclude structurally required duplicates: per-bundle Info.plists, NIB version variants, Asset Catalog Contents.json, cross-locale localization files, per-framework build scripts, per-framework metadata (.swiftmodule/.swiftdoc/modulemap), and known third-party SDK resources (100+ SDKs recognized). Only actionable duplicates are reported.


How to fix

1

Use a shared dynamic framework for extensions

Create a shared framework containing common resources. Set it to "Embed & Sign" in the app target and "Do Not Embed" in extension targets. Extensions link at runtime without their own copy.

2

Move shared assets into the framework's Asset Catalog

The framework's Assets.car lives in the shared Frameworks/ directory, accessible to all targets.

3

Audit same-bundle duplicates with hash comparison

Find identical files and keep only one copy. Centralize assets in a single Asset Catalog or resource directory rather than per-feature copies.

4

Review SPM resource behavior

SPM copies resources into each target by default. Consider native Xcode dynamic framework targets for shared resources instead.


Powered by Bitrise, trusted by 8,500+ brands

Size Analyzer is built by Bitrise, the leading mobile DevOps platform used by over 400,000 developers at companies like Shopify, TripAdvisor, and BuzzFeed. Free forever. No signup required.

Bitrise provides a full-stack mobile DevOps solution that unites the tools, processes, and testing frameworks engineering teams need to ship best-in-class mobile experiences.

Bitrise logo