Mapbox-gl-native: Dynamic framework is too big

Created on 24 Sep 2018  路  7Comments  路  Source: mapbox/mapbox-gl-native

Since I like reproducible builds, zero-config checkouts and ease of development (also when offline) among other reasons, I add the Pods/ directory to github. It seems some build configuration has changed between the 0.9.2 and 0.9.3 pod build settings? Or do I need to tweak something on my end?

remote: Resolving deltas: 100% (36/36), completed with 33 local objects.
remote: warning: File Pods/Mapbox-iOS-SDK/dynamic/Mapbox.framework/Mapbox is 70.95 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 4260c1065b630e7cdf5f3974bb9fe8ca
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Pods/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM/Contents/Resources/DWARF/Mapbox is 247.02 MB; this exceeds GitHub's file size limit of 100.00 MB
To github.com:foo/bar.git
 ! [remote rejected]   develop -> develop (pre-receive hook declined)

It looks like it is built with DWARF debug symbols, is there an option to get the binary without that?

Steps to reproduce

  1. install Apollo v0.9.2, update to 0.9.3
  2. observe repo bloat

Expected behavior

Actual behavior

Configuration

Mapbox SDK versions:
iOS/macOS versions:
Device/simulator models:
Xcode version:

iOS

Most helpful comment

From ios-v4.7.0-beta.1 onward, a new -stripped build flavor is available that addresses the use case in this issue. The framework binary in this build is currently ~55 MB and the dSYM is ~36 MB.

Similar to the now-retired -symbols build, a CocoaPods user would follow these instructions to install the -stripped build, which would look like this for ios-v4.7.0-beta.1:

pod 'Mapbox-iOS-SDK-stripped', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/ios-v4.7.0-beta.1/platform/ios/Mapbox-iOS-SDK-stripped.podspec'

Carthage users should use this feed URL.

All 7 comments

Hi, @js. Thank you for using Mapbox, the file increase is due to https://github.com/mapbox/mapbox-gl-native/pull/12672.

I'm going to close this issue as is not related to a bug or feature request.

As a user of your framework, I do see a bloated framework as a bug! Mapbox is the only framework that ships with a ton of debugging symbols, no-one else does this. Have you considered that maybe the majority of your users isn't interested in this, only those working on your framework is?

What is the suggested course of action here, should I build my own pod and distribute to anyone who thinks that a 270+ MB framework is perhaps a bit much? Can I setup cocoapods to strip the unwanted dwarf files

This is a rather complex framework and is subsequently relatively large on disk, before a developer integrates it into an app. Compared to similarly complex binary frameworks (Realm, PSPDFKit, etc.) I wouldn鈥檛 say we鈥檙e unusually large.

With that said (馃槈), we鈥檝e been on the fence about whether or not we should limit/revert #12672 and, after a bit more discussion, I鈥檓 going to start looking at ways to better isolate these new debug symbols into our separate -symbols build.

@js Thanks for your concern and patience. 馃檱

Do you have any suggested workarounds?

Pods/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM/Contents/Resources/DWARF/Mapbox is 247.02 MB; this exceeds GitHub's file size limit of 100.00 MB

As git isn鈥檛 designed for large file storage, GitHub encourages developers who choose to do so to use Git Large File Storage.

@friedbunny We've used git-lfs in the past and found it to be incredibly fiddly, frustrating, and distracting. We'd rather focus on writing code than wrangling git-lfs. We'll just untrack the dSYM, stop committing it going forward, and manually copy it into place for debugging or symbolication when needed.

From ios-v4.7.0-beta.1 onward, a new -stripped build flavor is available that addresses the use case in this issue. The framework binary in this build is currently ~55 MB and the dSYM is ~36 MB.

Similar to the now-retired -symbols build, a CocoaPods user would follow these instructions to install the -stripped build, which would look like this for ios-v4.7.0-beta.1:

pod 'Mapbox-iOS-SDK-stripped', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/ios-v4.7.0-beta.1/platform/ios/Mapbox-iOS-SDK-stripped.podspec'

Carthage users should use this feed URL.

Was this page helpful?
0 / 5 - 0 ratings