Skip to content

Commit

Permalink
fix(ios): exclude arm64 architecture from simulator build (#11844)
Browse files Browse the repository at this point in the history
* fix(ios): itemclick event its firing instead of a move event when ordering items in a list iOS 13+
* fix(ios): remove arm64 architecture from simulator build
* If xcode < 12 do not use EXCLUDED_ARCHS

Fixes TIMOB-28042
  • Loading branch information
vijaysingh-axway committed Aug 6, 2020
1 parent 59f313a commit 178bf92
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal"

FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework"

XCODE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :DTXcode" "$(xcode-select -p)/../Info.plist")

######################
# Build Frameworks
######################

xcodebuild -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1
# Exclude arm64 architecture from simulator build in XCode 12+- TIMOB-28042

if [[ $XCODE_VERSION -ge 1200 ]]; then
xcodebuild -scheme ${PROJECT_NAME} -sdk iphonesimulator EXCLUDED_ARCHS=arm64 -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1
else
xcodebuild -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1
fi

xcodebuild -scheme ${PROJECT_NAME} -sdk iphoneos -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos 2>&1

Expand All @@ -42,7 +49,6 @@ mkdir "${FRAMEWORK}"

cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}"


######################
# Make an universal binary
######################
Expand Down
5 changes: 5 additions & 0 deletions iphone/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ iOSModuleBuilder.prototype.buildModule = function buildModule(next) {
args.push('CONFIGURATION_BUILD_DIR=' + path.join(this.projectDir, 'build', 'Release-' + target));
}

// Exclude arm64 architecture from simulator build in XCode 12+ - TIMOB-28042
if (target === 'iphonesimulator' && parseFloat(this.xcodeEnv.version) >= 12.0) {
args.push('EXCLUDED_ARCHS=arm64');
}

return args;
}.bind(this);

Expand Down
9 changes: 9 additions & 0 deletions support/iphone/build_titaniumkit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ sed -i '' 's@__GITHASH__@'"$GIT_HASH"'@g' TitaniumKit/Sources/API/TopTiModule.m

REVEAL_ARCHIVE_IN_FINDER=false

XCODE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :DTXcode" "$(xcode-select -p)/../Info.plist")

FRAMEWORK_NAME="TitaniumKit"

SIMULATOR_LIBRARY_PATH="$(pwd)/build/Release-iphonesimulator/${FRAMEWORK_NAME}.framework"
Expand All @@ -61,8 +63,15 @@ FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework"
XCPRETTY="xcpretty"
which xcpretty || XCPRETTY="cat"

# Exclude arm64 architecture from simulator build in XCode 12+ - TIMOB-28042

if [[ $XCODE_VERSION -ge 1200 ]]; then
xcodebuild -scheme TitaniumKit -sdk iphonesimulator EXCLUDED_ARCHS=arm64 -configuration Release clean build CONFIGURATION_BUILD_DIR=build/Release-iphonesimulator | eval $XCPRETTY
[[ PIPESTATUS[0] -ne 0 ]] && exit 1
else
xcodebuild -scheme TitaniumKit -sdk iphonesimulator -configuration Release clean build CONFIGURATION_BUILD_DIR=build/Release-iphonesimulator | eval $XCPRETTY
[[ PIPESTATUS[0] -ne 0 ]] && exit 1
fi

xcodebuild -scheme TitaniumKit -sdk iphoneos -configuration Release clean build CONFIGURATION_BUILD_DIR=build/Release-iphoneos | eval $XCPRETTY
[[ PIPESTATUS[0] -ne 0 ]] && exit 1
Expand Down

0 comments on commit 178bf92

Please sign in to comment.