diff options
Diffstat (limited to 'platform/ios/scripts/package.sh')
-rwxr-xr-x | platform/ios/scripts/package.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh index 3a7342034a..31285182a7 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -194,6 +194,11 @@ if [[ ${BUILD_DYNAMIC} == true && ${BUILDTYPE} == Release ]]; then validate_dsym \ "${OUTPUT}/dynamic/${NAME}.framework.dSYM/Contents/Resources/DWARF/${NAME}" \ "${OUTPUT}/dynamic/${NAME}.framework/${NAME}" + + # To-do: remove this in 4.0.0, as we intend to remove support for i386 entirely. + step "Removing i386 slice from dSYM" + lipo -remove i386 "${OUTPUT}/dynamic/${NAME}.framework.dSYM/Contents/Resources/DWARF/${NAME}" -o "${OUTPUT}/dynamic/${NAME}.framework.dSYM/Contents/Resources/DWARF/${NAME}" + lipo -info "${OUTPUT}/dynamic/${NAME}.framework.dSYM/Contents/Resources/DWARF/${NAME}" fi function create_podspec { @@ -242,6 +247,23 @@ fi if [[ ${BUILD_DYNAMIC} == true && ${BUILD_FOR_DEVICE} == true ]]; then step "Copying bitcode symbol maps…" find "${PRODUCTS}/${BUILDTYPE}-iphoneos" -name '*.bcsymbolmap' -type f -exec cp -pv {} "${OUTPUT}/dynamic/" \; + + step "Copying demo project and sym linking to published framework…" + cp -rv platform/ios/scripts/script_resources/MapboxDemo "${OUTPUT}" + cd "${OUTPUT}/MapboxDemo" + ln -sv "../dynamic/${NAME}.framework" + cd - + + step "Building demo project…" + xcodebuild -quiet -project build/ios/pkg/MapboxDemo/MapboxDemo.xcodeproj -scheme MapboxDemo build ONLY_ACTIVE_ARCH=YES -destination 'platform=iOS Simulator,name=iPhone 7' clean build &> /tmp/iosdemobuildoutput || true + if grep -Fxq "** BUILD FAILED **" /tmp/iosdemobuildoutput + then + echo "Could not build demo project with this version of the SDK." + rm -rf "${OUTPUT}/MapboxDemo" + else + echo "Built and packaged demo project." + fi + rm /tmp/iosdemobuildoutput fi sed -n -e '/^## /,$p' platform/ios/CHANGELOG.md > "${OUTPUT}/CHANGELOG.md" |