### 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:
- Created a fresh, empty Xcode project.
- Archived and exported the IPA (App Store Connect distribution).
- Result without SDK: ~95 KB.
- Added
SwiftyDropbox (via SPM), initialized a basic DropboxClient, and archived again.
- 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
### 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
SwiftyDropboxon the final binary size:SwiftyDropbox(via SPM), initialized a basicDropboxClient, and archived again.An overhead of ~9.4 MB just for adding the capability to interact with Dropbox is excessive. Even with
Dead Code StrippingandWhole Module Optimizationenabled in Release mode (and-Osize), the SDK seems to pull in the entire dependency tree.It appears that
DropboxClientinitializes 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, orBusinessAPIs 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:
ASWebAuthenticationSessionfor OAuth 2.0.URLSessionfor 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