From b4f171ea230160a00cb4e0e530f5b0ad75e010cc Mon Sep 17 00:00:00 2001 From: Peter Kazazes Date: Thu, 10 Jun 2021 16:48:58 -0400 Subject: [PATCH] Include debug symbols in XCFramework output Note: The -debug-symbols arg requires an absolute path. BCSymbolMap files have a UUID filename, hence the wildcard. Fixes #1122. Signed-off-by: Peter Kazazes --- CHANGES.rst | 2 +- build.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f9f7e63c13..311f0ae9f9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -21,7 +21,7 @@ Changes to be released in next version * 🧱 Build - * + * build.sh: Include debug symbols when building XCFramework Others * diff --git a/build.sh b/build.sh index 46719953c6..4663490148 100755 --- a/build.sh +++ b/build.sh @@ -20,7 +20,15 @@ then if [ -f 'MatrixSDK.xcframework.zip' ]; then rm -rf MatrixSDK.xcframework.zip; fi # build and zip the xcframework - xcodebuild -create-xcframework -framework MatrixSDK-iOS.xcarchive/Products/Library/Frameworks/MatrixSDK.framework -framework MatrixSDK-iOSSimulator.xcarchive/Products/Library/Frameworks/MatrixSDK.framework -framework MatrixSDK-macOS.xcarchive/Products/Library/Frameworks/MatrixSDK.framework -framework MatrixSDK-MacCatalyst.xcarchive/Products/Library/Frameworks/MatrixSDK.framework -output MatrixSDK.xcframework + xcodebuild -create-xcframework \ + -framework MatrixSDK-iOS.xcarchive/Products/Library/Frameworks/MatrixSDK.framework \ + -debug-symbols ${PWD}/MatrixSDK-iOS.xcarchive/dSYMs/MatrixSDK.framework.dSYM \ + -debug-symbols ${PWD}/MatrixSDK-iOS.xcarchive/BCSymbolMaps/*.bcsymbolmap \ + -framework MatrixSDK-iOSSimulator.xcarchive/Products/Library/Frameworks/MatrixSDK.framework \ + -debug-symbols ${PWD}/MatrixSDK-iOSSimulator.xcarchive/dSYMs/MatrixSDK.framework.dSYM \ + -framework MatrixSDK-macOS.xcarchive/Products/Library/Frameworks/MatrixSDK.framework \ + -framework MatrixSDK-MacCatalyst.xcarchive/Products/Library/Frameworks/MatrixSDK.framework \ + -output MatrixSDK.xcframework zip -ry MatrixSDK.xcframework.zip MatrixSDK.xcframework else xcodebuild -workspace MatrixSDK.xcworkspace/ -scheme MatrixSDK -sdk iphonesimulator -destination 'name=iPhone 5s'