Skip to content

Commit 30d0dd8

Browse files
committed
Apple: Fix #667: Include debug symbols into precompiled PowerAuthCore framework (1.9.x)
1 parent 2282422 commit 30d0dd8

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

PowerAuthCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
2727

2828
# XCFramework build
2929
s.prepare_command = <<-CMD
30-
./scripts/ios-build-sdk.sh buildCore --out-dir Build/PowerAuthCore --optional-tvos
30+
./scripts/ios-build-sdk.sh buildCore --out-dir Build/PowerAuthCore --optional-tvos --include-dsyms
3131
CMD
3232

3333
# Produced files

scripts/ios-build-sdk.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ DO_COPYSDK=0
5959
OPT_LEGACY_ARCH=0
6060
OPT_USE_BITCODE=0
6161
OPT_WEAK_TVOS=0
62+
OPT_INCLUDE_DSYMS=0
6263

6364
# -----------------------------------------------------------------------------
6465
# USAGE prints help and exits the script with error code from provided parameter
@@ -81,6 +82,7 @@ function USAGE
8182
echo " -nc | --no-clean disable 'clean' before 'build'"
8283
echo " also disables temporary data cleanup after build"
8384
echo " --optional-tvos tvOS is not required when SDK is not installed"
85+
echo " --include-dsyms include debug symbols into final xcframework"
8486
echo " -v0 turn off all prints to stdout"
8587
echo " -v1 print only basic log about build progress"
8688
echo " -v2 print full build log with rich debug info"
@@ -347,8 +349,14 @@ function BUILD_COMMAND
347349

348350
# Add produced platform framework to the list
349351
local FINAL_FW="${ARCHIVE_PATH}/Products/Library/Frameworks/${OUT_FW}.framework"
352+
local FINAL_DSYM="${ARCHIVE_PATH}/dSYMs/${OUT_FW}.framework.dSYM"
350353
[[ ! -d "${FINAL_FW}" ]] && FAILURE "Xcode build did not produce '${OUT_FW}.framework' for platform ${PLATFORM}"
351354
ALL_FAT_LIBS+=("${FINAL_FW}")
355+
ALL_XCFW_ARGS+=" -framework ${FINAL_FW}"
356+
if [ x$OPT_INCLUDE_DSYMS == x1 ]; then
357+
[[ ! -d "${FINAL_DSYM}" ]] && FAILURE "Xcode build did not produce dSYMs for '${OUT_FW}.framework' for platform ${PLATFORM}"
358+
ALL_XCFW_ARGS+=" -debug-symbols ${FINAL_DSYM}"
359+
fi
352360
}
353361

354362
# -----------------------------------------------------------------------------
@@ -377,6 +385,7 @@ function BUILD_LIB
377385
PREPARE_OPENSSL
378386

379387
ALL_FAT_LIBS=()
388+
ALL_XCFW_ARGS=
380389

381390
BUILD_PATCH_ARCHITECTURES
382391

@@ -390,14 +399,12 @@ function BUILD_LIB
390399
LOG_LINE
391400
LOG "Creating final ${OUT_FW}.xcframework..."
392401
local XCFW_PATH="${OUT_DIR}/${OUT_FW}.xcframework"
393-
local XCFW_ARGS=
394402
for ARG in ${ALL_FAT_LIBS[@]}; do
395-
XCFW_ARGS+="-framework ${ARG} "
396403
DEBUG_LOG " - source fw: ${ARG}"
397404
done
398405
DEBUG_LOG " - target fw: ${XCFW_PATH}"
399406

400-
xcodebuild -create-xcframework $XCFW_ARGS -output "${XCFW_PATH}"
407+
xcodebuild -create-xcframework $ALL_XCFW_ARGS -output "${XCFW_PATH}"
401408
}
402409

403410
# -----------------------------------------------------------------------------
@@ -527,6 +534,9 @@ do
527534
--optional-tvos)
528535
OPT_WEAK_TVOS=1
529536
;;
537+
--include-dsyms)
538+
OPT_INCLUDE_DSYMS=1
539+
;;
530540
--legacy-archs)
531541
OPT_LEGACY_ARCH=1
532542
;;

scripts/templates/PowerAuth2.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Pod::Spec.new do |s|
33
s.cocoapods_version = '>= 1.10'
44
s.name = 'PowerAuth2'
55
s.version = '%DEPLOY_VERSION%'
6-
s.summary = 'PowerAuth Mobile SDK for iOS'
6+
s.summary = 'PowerAuth Mobile SDK for iOS and tvOS'
77
s.homepage = 'https://github.com/wultra/powerauth-mobile-sdk'
88
s.social_media_url = 'https://twitter.com/wultra'
99
s.documentation_url = 'https://github.com/wultra/powerauth-mobile-sdk/blob/develop/docs/PowerAuth-SDK-for-iOS.md'

scripts/templates/PowerAuthCore.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Pod::Spec.new do |s|
33
s.cocoapods_version = '>= 1.10'
44
s.name = 'PowerAuthCore'
55
s.version = '%DEPLOY_VERSION%'
6-
s.summary = 'PowerAuthCore library for iOS'
6+
s.summary = 'PowerAuthCore library for iOS and tvOS'
77
s.homepage = 'https://github.com/wultra/powerauth-mobile-sdk'
88
s.social_media_url = 'https://twitter.com/wultra'
99
s.documentation_url = 'https://github.com/wultra/powerauth-mobile-sdk/blob/develop/docs/PowerAuth-SDK-for-iOS.md'
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
2727

2828
# XCFramework build
2929
s.prepare_command = <<-CMD
30-
./scripts/ios-build-sdk.sh buildCore --out-dir Build/PowerAuthCore --optional-tvos
30+
./scripts/ios-build-sdk.sh buildCore --out-dir Build/PowerAuthCore --optional-tvos --include-dsyms
3131
CMD
3232

3333
# Produced files

0 commit comments

Comments
 (0)