Skip to content

Commit 8928808

Browse files
rydermackayadamtharani
authored andcommitted
Add build script
1 parent 875bd1d commit 8928808

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Externals
2+
DerivedData
23

34
example/ios/iOS UI Test/DerivedData
45
scripts/prebuilt.list

build.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
DERIVED_DATA_DIR="DerivedData"
4+
PRODUCTS_DIR="${DERIVED_DATA_DIR}/Build/Products"
5+
6+
# carthage adds these, not sure if necessary
7+
EXTRA_ARGS="ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="
8+
9+
# libetpan has been set up to build an xcframework for libsasl2, however xcframeworks must exist at the *start* of the build process
10+
# I didn't have time to figure out something less awful than building libetpan first
11+
# It'll copy sasl.xcframework to the build directory
12+
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "libetpan ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphoneos ${EXTRA_ARGS}
13+
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "libetpan ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphonesimulator ${EXTRA_ARGS}
14+
15+
# mailcore2 references the sasl.xcframework in the build directory
16+
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "mailcore ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphoneos ${EXTRA_ARGS}
17+
xcodebuild -project build-mac/mailcore2.xcodeproj -scheme "mailcore ios" -configuration Release -derivedDataPath ${DERIVED_DATA_DIR} -sdk iphonesimulator ${EXTRA_ARGS}
18+
19+
# glue it all together
20+
# note -debug-symbols path has to be absolute, see https://developer.apple.com/forums/thread/655768
21+
xcodebuild -create-xcframework \
22+
-framework "${PRODUCTS_DIR}/Release-iphoneos/MailCore.framework" \
23+
-debug-symbols "${PWD}/${PRODUCTS_DIR}/Release-iphoneos/MailCore.framework.dSYM" \
24+
-framework "${PRODUCTS_DIR}/Release-iphonesimulator/MailCore.framework" \
25+
-debug-symbols "${PWD}/${PRODUCTS_DIR}/Release-iphonesimulator/MailCore.framework.dSYM" \
26+
-output "${PRODUCTS_DIR}/MailCore.xcframework"

0 commit comments

Comments
 (0)