-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Convert iOS SDK into dynamic framework #3183
Conversation
Current progress on
|
|
One downside to shipping a true dynamic framework (as opposed to a framework bundle containing a static library, as we do now) is that App Store submissions aren’t allowed to contain simulator content, as reported in Carthage/Carthage#188. If we ship a fat framework containing both device and simulator content, developers will need to strip the irrelevant content before code-signing. (Currently I’m relying on the “code sign on copy” build phase option that gets enabled when you use the Embedded Binaries section in the project editor.) |
Currently, |
Making the framework compatible with Carthage should now be possible which is awesome!
See https://github.com/Carthage/Carthage#supporting-carthage-for-your-framework |
abf61a0
to
fa7bbc7
Compare
package.sh now produces a pkg/ folder containing:
To minimize our build and test matrix, I’ve omitted options for building a Bitcode-enabled static framework (for deploying back to iOS 7 in Xcode 7) or a Bitcode-disabled dynamic framework (for deploying to iOS 8.x only in Xcode 6.x). |
build/pkg/osx/ probably won’t be used until #3183 lands.
937e243
to
38db77c
Compare
38db77c
to
495984d
Compare
@friedbunny @incanus @bsudekum (and anyone else interested), I’d like your help with this test plan, in order of priority:
Testing one of the workflows above generally involves answering the following questions:
Let me know if you have any questions about how to test one of these cases. Thanks for your time; hopefully such drastic changes will be a rare occurrence going forward. |
Going to start running through this list today, beginning with CocoaPods. |
Ran in to #3300, but the |
With CocoaPods and direct install, IBDesignables dies with:
... the map itself loads as expected in app. |
Avoid hard-coding the bundle identifier and version string.
The pod now requires iOS 8 and above, since iOS 7 lacks support for dynamic frameworks. iOS 7 support can be obtained by downloading and installing the framework manually. Bumped the version number.
The build output’s readme now explains in full detail the installation process, rather than linking to an online resource that may not match the current version. Also cleaned up the tag-finding code to better handle double-digit situations.
Omit setup instructions for package formats not included in the build output.
CocoaPods dings this pod for not having a separate changelog.
Split API documentation generation into a separate make target that can be run independently of building the SDK.
The API index page serves a different purpose than the readme. It doesn’t need installation instructions, but it does need a brief What’s New section.
1402e08
to
31120ea
Compare
@1ec5 "The SDK is now distributed as a dynamic framework instead of a static library, resulting in a simpler installation workflow and significantly reduced download size. The framework contains both simulator and device content; due to an Xcode bug, you’ll need to strip out the simulator content before submitting your application to the App Store." are you guys fix this? or we have to strip out the simulator content for 3.10 framework when submit to app store? any guide for this? |
@chriszhang4213, if you follow the installation instructions in the README.md that’s in the ZIP file you download, you’ll be just fine. The last step automatically strips the simulator content for you. Sorry for not making that clear. |
@1ec5, you mean bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework/strip-frameworks.sh" " this step right? |
Yes, that step will strip out any framework content that doesn’t match the architecture you’re building for. So when you export for the App Store, the script will strip out any simulator content. |
By the way, if you install using CocoaPods and the |
The umbrella header inside the static framework now imports the required iOS SDK frameworks so manual linking is unnecessary. This change corrects a regression introduced in #3183, when the umbrella header used in version 3.0.1 was removed.
make iproj
now produces a target that pulls together static libraries like core and platform-ios into a true dynamic framework (as opposed to a static library executable stuffed inside a framework bundle). iosapp is pretty much just a regular iOS application that links Mapbox.framework (except for the inclusion of default_styles.hpp).For now, I’ve patched support for code signing files in Copy Files build phases into the ancient checked-in copy of gyp, pending #3178.Dynamic framework distribution relies on a shell script copied from realm/realm-swift#2759. This script works around an App Store bug.
Fixes #828, fixes #3161, paving the way for #1623. Based on #3135 for OS X.
/cc @incanus @friedbunny