summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2016-06-01 14:34:54 -0400
committerJason Wray <jason@mapbox.com>2016-06-01 15:54:46 -0400
commitc08a54dd8223731a578046a0e086300c075f676c (patch)
treea321b2e2ed2a0211c65ea4655eade113860fb908 /platform
parentfcacbb87ef9a808bf3554e60c978710c04cff9f5 (diff)
downloadqtlocation-mapboxgl-c08a54dd8223731a578046a0e086300c075f676c.tar.gz
[ios] Fix static framework conglomeration
- Include libMapbox.a, which contains our Obj-C classes, in the fat archive. - Simulator libraries now always include x86_64 slices.
Diffstat (limited to 'platform')
-rwxr-xr-xplatform/ios/scripts/package.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index 8f41003b79..6bf9dd12b0 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -84,6 +84,7 @@ xcodebuild \
CURRENT_SHORT_VERSION=${SHORT_VERSION} \
CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \
CURRENT_COMMIT_HASH=${HASH} \
+ ONLY_ACTIVE_ARCH=NO \
-derivedDataPath ${DERIVED_DATA} \
-workspace ./platform/ios/ios.xcworkspace \
-scheme ${SCHEME} \
@@ -98,6 +99,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then
CURRENT_SHORT_VERSION=${SHORT_VERSION} \
CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \
CURRENT_COMMIT_HASH=${HASH} \
+ ONLY_ACTIVE_ARCH=NO \
-derivedDataPath ${DERIVED_DATA} \
-workspace ./platform/ios/ios.xcworkspace \
-scheme ${SCHEME} \
@@ -106,7 +108,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then
-jobs ${JOBS} | xcpretty
fi
-LIBS=(core.a platform-ios.a)
+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
@@ -114,10 +116,10 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
step "Assembling static framework for iOS Simulator and devices…"
mkdir -p ${OUTPUT}/static/${NAME}.framework
libtool -static -no_warning_for_no_symbols \
- `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \
-o ${OUTPUT}/static/${NAME}.framework/${NAME} \
- ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphoneos/libmbgl-} \
- ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/libmbgl-}
+ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphoneos/lib} \
+ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/lib} \
+ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a`
cp -rv ${PRODUCTS}/${BUILDTYPE}-iphoneos/${NAME}.bundle ${STATIC_BUNDLE_DIR}
fi
@@ -145,9 +147,9 @@ else
step "Assembling static library for iOS Simulator…"
mkdir -p ${OUTPUT}/static/${NAME}.framework
libtool -static -no_warning_for_no_symbols \
- `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \
-o ${OUTPUT}/static/${NAME}.framework/${NAME} \
- ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/libmbgl-}
+ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/lib} \
+ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a`
cp -rv ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.bundle ${STATIC_BUNDLE_DIR}
fi