Skip to content

SDK Binary size impact is ~5.2 MB via SPM - Request for optimization / Lightweight Core #6176

@Anywhere-Music-Player

Description

@Anywhere-Music-Player

I am integrating RevenueCat into a lightweight iOS 17+ SwiftUI application. My goal is to use RevenueCat strictly for analytics (Observer Mode) and receipt validation, without any UI components.

After adding the RevenueCat package via Swift Package Manager, I observed a binary size increase of approximately 5.2 MB in the archived build.

To Reproduce

Create a clean Xcode project (iOS 17, SwiftUI).

Archive and check the estimated App Store size.

Add RevenueCat via SPM (Dependency Rule: Up to Next Major).

Important: I am NOT importing RevenueCatUI, only the core RevenueCat.

Archive again (Release configuration, -O optimization).

Compare the Thinned App size.

Observed Results The SDK adds ~5.2 MB to the final binary.

Expected behavior For a library primarily handling network requests and receipt parsing, I expected a footprint closer to 1-2 MB. 5 MB is a significant overhead for developers who care about app size and "app clip" experiences, especially when we only need the backend/analytics capabilities.

Question Is there a specific way to import a "Lite" version of the SDK? Or are there build settings to strip unused architectures/symbols further? If not, please consider this a feature request to modularize the SDK further so we can exclude heavy legacy code or unused features.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions