Skip to content

Commit 178bf92

Browse files
authoredAug 6, 2020
fix(ios): exclude arm64 architecture from simulator build (#11844)
* 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
1 parent 59f313a commit 178bf92

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed
 

‎iphone/TitaniumKit/TitaniumKit/Scripts/build-universal-framework.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal"
1616

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

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

2021
######################
2122
# Build Frameworks
2223
######################
2324

24-
xcodebuild -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1
25+
# Exclude arm64 architecture from simulator build in XCode 12+- TIMOB-28042
26+
27+
if [[ $XCODE_VERSION -ge 1200 ]]; then
28+
xcodebuild -scheme ${PROJECT_NAME} -sdk iphonesimulator EXCLUDED_ARCHS=arm64 -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1
29+
else
30+
xcodebuild -scheme ${PROJECT_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator 2>&1
31+
fi
2532

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

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

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

45-
4652
######################
4753
# Make an universal binary
4854
######################

‎iphone/cli/commands/_buildModule.js

+5
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,11 @@ iOSModuleBuilder.prototype.buildModule = function buildModule(next) {
473473
args.push('CONFIGURATION_BUILD_DIR=' + path.join(this.projectDir, 'build', 'Release-' + target));
474474
}
475475

476+
// Exclude arm64 architecture from simulator build in XCode 12+ - TIMOB-28042
477+
if (target === 'iphonesimulator' && parseFloat(this.xcodeEnv.version) >= 12.0) {
478+
args.push('EXCLUDED_ARCHS=arm64');
479+
}
480+
476481
return args;
477482
}.bind(this);
478483

‎support/iphone/build_titaniumkit.sh

+9
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ sed -i '' 's@__GITHASH__@'"$GIT_HASH"'@g' TitaniumKit/Sources/API/TopTiModule.m
4444

4545
REVEAL_ARCHIVE_IN_FINDER=false
4646

47+
XCODE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :DTXcode" "$(xcode-select -p)/../Info.plist")
48+
4749
FRAMEWORK_NAME="TitaniumKit"
4850

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

66+
# Exclude arm64 architecture from simulator build in XCode 12+ - TIMOB-28042
67+
68+
if [[ $XCODE_VERSION -ge 1200 ]]; then
69+
xcodebuild -scheme TitaniumKit -sdk iphonesimulator EXCLUDED_ARCHS=arm64 -configuration Release clean build CONFIGURATION_BUILD_DIR=build/Release-iphonesimulator | eval $XCPRETTY
70+
[[ PIPESTATUS[0] -ne 0 ]] && exit 1
71+
else
6472
xcodebuild -scheme TitaniumKit -sdk iphonesimulator -configuration Release clean build CONFIGURATION_BUILD_DIR=build/Release-iphonesimulator | eval $XCPRETTY
6573
[[ PIPESTATUS[0] -ne 0 ]] && exit 1
74+
fi
6675

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

0 commit comments

Comments
 (0)
Please sign in to comment.