Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ unitypackage:
./build.sh --apple-sdk-version=${IOS_SDK_VERSION} --android-sdk-version=${ANDROID_SDK_VERSION} --version=${UNITY_VERSION}

unitypackage-pre-x:
./build.sh --apple-sdk-version=${IOS_SDK_VERSION} --android-sdk-version=${ANDROID_SDK_VERSION_PRE_X} --version=${UNITY_VERSION_PRE_X}
./build.sh --apple-sdk-version=${IOS_SDK_VERSION} --android-sdk-version=${ANDROID_SDK_VERSION_PRE_X} --version=${UNITY_VERSION_PRE_X}

unitypackage-without-simulator:
./build.sh --apple-sdk-version=${IOS_SDK_VERSION} --android-sdk-version=${ANDROID_SDK_VERSION} --version=${UNITY_VERSION} --no-simulator
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ set -o errexit

PATH_TO_UNITY_ROOT="/Applications/Unity/Unity.app"

REMOVE_SIMULATOR_ARCH=false

#######################################
# Gets the latest version of specified repo
# Globals:
Expand Down Expand Up @@ -54,6 +56,15 @@ download_ios_sdk() {
rm -rf "/tmp/Leanplum-${version}.zip"
mv "/tmp/Leanplum.framework" "/tmp/Leanplum-${version}.framework"


if [ "$REMOVE_SIMULATOR_ARCH" = true ] ; then
echo "Removing x86_64 & i386 architecture from iOS library"
cd "/tmp/Leanplum-${version}.framework"
lipo -remove x86_64 Leanplum -o Leanplum
lipo -remove i386 Leanplum -o Leanplum
cd -
fi

echo "Finished downloading iOS SDK."
}

Expand Down Expand Up @@ -128,6 +139,7 @@ build() {
echo "$PATH_TO_UNITY_ROOT exist"
else
PATH_TO_UNITY_ROOT=$(get_unity_from_hub)
echo "Getting Unity from Unity HUB"
fi

PATH_TO_UNITY="$PATH_TO_UNITY_ROOT/Contents/MacOS/Unity"
Expand Down Expand Up @@ -171,6 +183,10 @@ main() {
set -o xtrace
shift
;;
--no-simulator)
REMOVE_SIMULATOR_ARCH=true
shift
;;
esac
done

Expand Down