[ios, build] Replace -symbols with -stripped build flavor
This commit is contained in:
@@ -20,6 +20,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
|
||||
|
||||
### Packaging
|
||||
|
||||
* Added the `Mapbox-iOS-SDK-stripped` build flavor, featuring fewer debug symbols. Regular framework binaries are no longer stripped of debug symbols and the `Mapbox-iOS-SDK-symbols` build has been retired. ([#13504](https://github.com/mapbox/mapbox-gl-native/pull/13504))
|
||||
* This SDK’s dynamic framework now has a bundle identifier of `com.mapbox.Mapbox`. ([#12857](https://github.com/mapbox/mapbox-gl-native/pull/12857))
|
||||
|
||||
### Other changes
|
||||
|
||||
@@ -20,13 +20,13 @@ Before building, use the scheme picker button in the toolbar to change the schem
|
||||
|
||||
**iosapp** is only one of several shared schemes. Others include:
|
||||
|
||||
* **CI** builds exactly what gets built for continuous integration on Bitrise.
|
||||
* **bench** is a simple benchmarking application. For more consistent results between runs, run `platform/ios/benchmark/assets/{glyphs,tiles}/download.sh` to download any necessary resources.
|
||||
* **dynamic** builds the SDK as a dynamic framework.
|
||||
* **static** builds the SDK as a static library and separate resource bundle.
|
||||
* **dynamic+static** is a combination of the **dynamic** and **static** schemes.
|
||||
* **CI** builds exactly what gets built by our continuous integration service.
|
||||
* **bench** is a simple benchmarking application. For more consistent results between runs, run `platform/ios/benchmark/assets/{glyphs,tiles}/download.sh` to download any necessary resources.
|
||||
|
||||
If you don’t have an Apple Developer account, change the destination to a simulator such as “iPhone 6s” before you build and run the app.
|
||||
If you don’t have an Apple Developer account, change the destination to a simulator before you build and run the app.
|
||||
|
||||
### Packaging builds
|
||||
|
||||
@@ -41,7 +41,7 @@ Build and package the SDK by using the `make iframework` command. You can custom
|
||||
* `BUILDTYPE=Release` will optimize for distribution. Defaults to `Debug`.
|
||||
* `BUILD_DEVICE=false` builds only for the iOS Simulator.
|
||||
* `FORMAT=dynamic` builds only a dynamic framework. `FORMAT=static` builds only a static framework, for legacy compatibility.
|
||||
* `SYMBOLS=NO` strips the build output of any debug symbols, yielding smaller binaries. Defaults to `YES`.
|
||||
* `SYMBOLS=NO` strips the build output of debug symbols. Defaults to `YES`.
|
||||
|
||||
An example command that creates a dynamic framework suitable for eventual App Store distribution:
|
||||
|
||||
|
||||
@@ -136,9 +136,19 @@ pod 'Mapbox-iOS-SDK-nightly-dynamic', podspec: 'https://raw.githubusercontent.co
|
||||
|
||||
If using the static framework, add `$(inherited)` to your target’s Other Linker Flags in the Build Settings tab.
|
||||
|
||||
##### Using pre-stripped releases with CocoaPods
|
||||
|
||||
If you choose to commit the contents of your `Pods` directory to source control and are encountering file size limitations, you may wish to use builds that have been pre-stripped of debug symbols.
|
||||
|
||||
```rb
|
||||
pod 'Mapbox-iOS-SDK-stripped', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/ios-v{x.x.x}/platform/ios/Mapbox-iOS-SDK-stripped.podspec'
|
||||
```
|
||||
|
||||
Note that these builds lack some debugging information, which could make development more difficult and result in less useful crash reports. Though initially smaller on disk, using these builds has no effect on the ultimate size of your application — see our [Understanding iOS Framework Size guide](https://www.mapbox.com/help/ios-framework-size/) for more information.
|
||||
|
||||
#### Carthage
|
||||
|
||||
For instructions on installing stable release versions of the Mapbox Maps SDK for iOS with Carthage, see [our website](https://www.mapbox.com/install/ios/carthage/). If you require a build without symbols pre-stripped, use [this feed URL](https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK-symbols.json) with Carthage.
|
||||
For instructions on installing stable release versions of the Mapbox Maps SDK for iOS with Carthage, see [our website](https://www.mapbox.com/install/ios/carthage/). If you require a build with debug symbols pre-stripped, use [this feed URL](https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK-stripped.json) with Carthage.
|
||||
|
||||
##### Testing pre-releases with Carthage
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ Pod::Spec.new do |m|
|
||||
|
||||
version = '4.7.0-alpha.3'
|
||||
|
||||
m.name = 'Mapbox-iOS-SDK-symbols'
|
||||
m.version = "#{version}-symbols"
|
||||
m.name = 'Mapbox-iOS-SDK-stripped'
|
||||
m.version = "#{version}-stripped"
|
||||
|
||||
m.summary = 'Open source vector map solution for iOS with full styling capabilities.'
|
||||
m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.'
|
||||
@@ -111,7 +111,7 @@ if [[ "${GITHUB_RELEASE}" == true ]]; then
|
||||
--description "${RELEASE_NOTES}"
|
||||
fi
|
||||
|
||||
buildPackageStyle "iframework" "symbols-dynamic"
|
||||
buildPackageStyle "iframework SYMBOLS=NO" "dynamic"
|
||||
buildPackageStyle "iframework" "dynamic"
|
||||
buildPackageStyle "iframework SYMBOLS=NO" "stripped-dynamic"
|
||||
|
||||
step "Finished deploying ${PUBLISH_VERSION} in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds"
|
||||
|
||||
@@ -10,10 +10,14 @@ DERIVED_DATA=build/ios
|
||||
PRODUCTS=${DERIVED_DATA}
|
||||
LOG_PATH=build/xcodebuild-$(date +"%Y-%m-%d_%H%M%S").log
|
||||
|
||||
BUILDTYPE=${BUILDTYPE:-Debug}
|
||||
BUILD_FOR_DEVICE=${BUILD_DEVICE:-true}
|
||||
SYMBOLS=${SYMBOLS:-YES}
|
||||
|
||||
BUILDTYPE=${BUILDTYPE:-Debug}
|
||||
if [[ ${SYMBOLS} == YES && ${BUILDTYPE} == Release ]]; then
|
||||
BUILDTYPE='RelWithDebInfo'
|
||||
fi
|
||||
|
||||
FORMAT=${FORMAT:-dynamic}
|
||||
BUILD_DYNAMIC=true
|
||||
BUILD_STATIC=false
|
||||
@@ -204,7 +208,7 @@ fi
|
||||
|
||||
function create_podspec {
|
||||
step "Creating local podspec (${1})"
|
||||
[[ $SYMBOLS = YES ]] && POD_SUFFIX="-symbols" || POD_SUFFIX=""
|
||||
[[ $SYMBOLS = NO ]] && POD_SUFFIX="-stripped" || POD_SUFFIX=""
|
||||
POD_SOURCE_PATH=' :path => ".",'
|
||||
POD_FRAMEWORKS=" m.vendored_frameworks = '"${NAME}".framework'"
|
||||
INPUT_PODSPEC=platform/ios/${NAME}-iOS-SDK${POD_SUFFIX}.podspec
|
||||
|
||||
@@ -40,7 +40,7 @@ du -sch dynamic/*
|
||||
#
|
||||
# upload
|
||||
#
|
||||
PROGRESS=
|
||||
PROGRESS=""
|
||||
if [ -n "${CI:-}" ]; then
|
||||
PROGRESS="--no-progress"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user