Skip to content

Huge binary size overhead (~9.0MB) when integrating SwiftyDropbox #453

@Anywhere-Music-Player

Description

@Anywhere-Music-Player

### Is your feature request related to a problem? Please describe.
Yes, the current SDK size is prohibitively large for lightweight iOS applications.

I conducted a clean experiment to measure the impact of SwiftyDropbox on the final binary size:

  1. Created a fresh, empty Xcode project.
  2. Archived and exported the IPA (App Store Connect distribution).
  3. Result without SDK: ~95 KB.
  4. Added SwiftyDropbox (via SPM), initialized a basic DropboxClient, and archived again.
  5. Result with SDK: ~9.5 MB.

An overhead of ~9.4 MB just for adding the capability to interact with Dropbox is excessive. Even with Dead Code Stripping and Whole Module Optimization enabled in Release mode (and -Osize), the SDK seems to pull in the entire dependency tree.

It appears that DropboxClient initializes all namespace routes (Files, Sharing, Users, Paper, Team, etc.) by default, creating hard references that prevent the Swift Linker from stripping unused modules.

### Describe the solution you'd like
I would like to see a modular approach to the SDK distribution.

Ideally, I should be able to import only the modules I need via SPM. For example:

  • SwiftyDropboxCore (Auth + Networking)
  • SwiftyDropboxFiles (File operations)

If I only need to log in and download files, I should not be forced to include code for Paper, Team, or Business APIs in my app bundle.

### Describe alternatives you've considered
Due to this size issue, I am forced to remove SwiftyDropbox entirely from my project.

I am currently switching to a manual implementation using:

  • ASWebAuthenticationSession for OAuth 2.0.
  • Native URLSession for REST API calls.

This is a significant downgrade in developer experience, but necessary because I cannot justify adding nearly 10MB to my app for just 3 basic features (Login, List Folder, Download).

### Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions