diff --git a/platform/ios/DEVELOPING.md b/platform/ios/DEVELOPING.md index 4efc6af48..a31eac284 100644 --- a/platform/ios/DEVELOPING.md +++ b/platform/ios/DEVELOPING.md @@ -51,7 +51,7 @@ You can customize the build output by passing the following arguments into the ` * `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 compatibility with iOS 7.x. -* `SYMBOLS=NO` strips the build output of any debug symbols, yielding much smaller binaries. +* `SYMBOLS=NO` strips the build output of any debug symbols, yielding much smaller binaries. Defaults to `YES`. An example command that creates a dynamic framework suitable for eventual App Store distribution: diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh index c753c63df..8ad779d6b 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -11,7 +11,7 @@ PRODUCTS=${DERIVED_DATA}/Build/Products BUILDTYPE=${BUILDTYPE:-Debug} BUILD_FOR_DEVICE=${BUILD_DEVICE:-true} -GCC_GENERATE_DEBUGGING_SYMBOLS=${SYMBOLS:-YES} +SYMBOLS=${SYMBOLS:-YES} BUILD_DYNAMIC=true BUILD_STATIC=true @@ -42,7 +42,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then fi IOS_SDK_VERSION=`xcrun --sdk ${SDK} --show-sdk-version` -echo "Configuring ${FORMAT:-dynamic and static} ${BUILDTYPE} framework for ${SDK}; symbols: ${GCC_GENERATE_DEBUGGING_SYMBOLS}; self-contained static framework: ${SELF_CONTAINED:-NO}" +echo "Configuring ${FORMAT:-dynamic and static} ${BUILDTYPE} framework for ${SDK}; symbols: ${SYMBOLS}; self-contained static framework: ${SELF_CONTAINED:-NO}" function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } function finish { >&2 echo -en "\033[0m"; } @@ -79,7 +79,6 @@ elif [[ ${BUILD_STATIC} == true ]]; then fi xcodebuild \ - GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ CURRENT_PROJECT_VERSION=${PROJ_VERSION} \ CURRENT_SHORT_VERSION=${SHORT_VERSION} \ CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \ @@ -94,7 +93,6 @@ xcodebuild \ if [[ ${BUILD_FOR_DEVICE} == true ]]; then xcodebuild \ - GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ CURRENT_PROJECT_VERSION=${PROJ_VERSION} \ CURRENT_SHORT_VERSION=${SHORT_VERSION} \ CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \ @@ -111,7 +109,7 @@ fi LIBS=(Mapbox.a mbgl-core.a mbgl-platform-ios.a) # https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c -if [[ "${BUILD_FOR_DEVICE}" == true ]]; then +if [[ ${BUILD_FOR_DEVICE} == true ]]; then if [[ ${BUILD_STATIC} == true ]]; then step "Assembling static framework for iOS Simulator and devices…" mkdir -p ${OUTPUT}/static/${NAME}.framework @@ -168,8 +166,8 @@ else cp -rv ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/Settings.bundle ${STATIC_SETTINGS_DIR} fi -if [[ "${GCC_GENERATE_DEBUGGING_SYMBOLS}" == false ]]; then - step "Stripping binaries…" +if [[ ${SYMBOLS} = NO ]]; then + step "Stripping symbols from binaries…" if [[ ${BUILD_STATIC} == true ]]; then strip -Sx "${OUTPUT}/static/${NAME}.framework/${NAME}" fi