Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Stop deploying the static framework #12841

Closed
friedbunny opened this issue Sep 6, 2018 · 6 comments
Closed

Stop deploying the static framework #12841

friedbunny opened this issue Sep 6, 2018 · 6 comments
Labels
build iOS Mapbox Maps SDK for iOS

Comments

@friedbunny
Copy link
Contributor

friedbunny commented Sep 6, 2018

In light of:

... we should stop including the static framework in our release deployments. Interested developers will still be able to build it themselves.

/cc @mapbox/maps-ios

@friedbunny friedbunny added iOS Mapbox Maps SDK for iOS build labels Sep 6, 2018
@friedbunny friedbunny added this to the ios-v4.5.0 milestone Sep 6, 2018
@1ec5
Copy link
Contributor

1ec5 commented Sep 6, 2018

This document will need to be updated to be even less optimistic about the static framework.

@1ec5
Copy link
Contributor

1ec5 commented Sep 11, 2018

Not sure if it’s a problem, but make ipackage still tries to merge in ICU from Mason even after #12808:

libtool -static -no_warning_for_no_symbols \
-o ${OUTPUT}/static/${NAME}.framework/${NAME} \
${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphoneos/lib} \
${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/lib} \
`cmake -LA -N ${DERIVED_DATA} | grep MASON_PACKAGE_icu_LIBRARIES | cut -d= -f2`

@js
Copy link

js commented Sep 25, 2018

As a newcomer frustrated with the size of the Mapbox iOS framework this is very confusing. The first comment states:

[static framework adds] Hundreds of megabytes of extra zipped size (and gigabytes, unzipped) after #12672.

and the document linked above states

If you have installed our SDK via CocoaPods or Carthage, you are already using our dynamic framework.

Yet this is the size of the latest release

$ du -sh mapbox-ios-sdk-4.4.1-dynamic.zip 
112M	mapbox-ios-sdk-4.4.1-dynamic.zip

and unzipped:

$ du -sh dynamic/
338M	dynamic/

This will bloat the size of any repository it is added to, without an additional step to strip the 256M of dSYM debug symbol. Why are these distributed anyway? That's not exactly common practice…

Also, there's significant additional bloat between v4.3.0 and 4.4.1 (90MB vs 338MB!):

du -sh Pods/Mapbox-iOS-SDK/dynamic/*
1.5M	Pods/Mapbox-iOS-SDK/dynamic/38F3F1B0-BDAC-3C0D-9DEE-A201A7ACC800.bcsymbolmap
1.5M	Pods/Mapbox-iOS-SDK/dynamic/CB4E30A5-98B9-3FBA-AA44-CDBAF7583314.bcsymbolmap
 50M	Pods/Mapbox-iOS-SDK/dynamic/Mapbox.framework
 36M	Pods/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM

@friedbunny
Copy link
Contributor Author

@js You are indeed solely downloading/using the dynamic framework (and so this particular issue isn’t strictly relevant, as it’s about the static framework).

The root cause of the extra size in all flavors of 4.4.x is #12672, which enabled the inclusion of extra debug symbols in Release builds — the static framework was significantly more affected by that change, but the dynamic framework also grew. For GitHub releases we upload a variety of zips, some of which include both static and dynamic frameworks; stopping deployment of the static framework to GitHub is the primary goal of this issue.

This will bloat the size of any repository it is added to, without an additional step to strip the 256M of dSYM debug symbol. Why are these distributed anyway? That's not exactly common practice…

I do tend to agree that shipping a dSYM is something we should reconsider, but stopping doing so would not make the dynamic framework smaller — it would become larger still, as all of the debug symbols (necessary for crash symbolication, breakpoints, etc.) would remain in the main binary (instead of most of them being stripped out into the dSYM).

Though inconvenient, there are ways to work around size limits in git(hub) repositories. In particular, removing bitcode can significantly reduce size (if that’s something you can live without).

@friedbunny
Copy link
Contributor Author

Working on addressing regular dynamic framework size issues in #12947.

@1ec5
Copy link
Contributor

1ec5 commented Sep 26, 2018

As yet unsolved Xcode 10 incompatibilities. (#12339)

For what it’s worth, #12971 fixes the Xcode 10 incompatibility.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

3 participants