Hello,
My Swift / iOS app runs fine on simulator, but fails at linking step when running on physical device with the following error (if relevant, on a M1 Mac) :
dyld[10576]: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E
Referenced from: <2798FCFA-E27D-34FA-838C-833DABBFC7DC> /private/var/containers/Bundle/Application/***/yyy.app/Frameworks/LyraPaymentSDK.framework/LyraPaymentSDK
Expected in: <D4CE9EDB-D775-353D-9E8A-1BDB67F0C849> /private/var/containers/Bundle/Application/***/yyy.app/Frameworks/sentry_client_cocoa.framework/sentry_client_cocoa
I guess the problem is related to the LyraPaymentSDK dependencies : i use carthage to grab and build these deps using the following cartfile :
github "CosmicMind/Motion" == 3.1.3
github "CosmicMind/Material" == 3.1.8
github "SnapKit/SnapKit" == 5.6.0
binary "https://raw.githubusercontent.com/lyra/ios-sdk/2.6.3/LyraPaymentSDK.json" == 2.6.3
binary "https://raw.githubusercontent.com/lyra/sentry-client-cocoa/4.0.0/sentry_client_cocoa.json" == 4.0.0
github "getsentry/sentry-cocoa" == 8.5.0
The carthage build is done with the following command :
sh carthage.sh update --platform ios --use-xcframeworks --no-use-binaries
and the carthage.sh script has the following content :
#!/usr/bin/env bash
# carthage.sh
# Usage example: ./carthage.sh build --platform iOS
set -euo pipefail
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
# For Xcode 14 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1400__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1400 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1400__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
## optional
echo 'IPHONEOS_DEPLOYMENT_TARGET = 11.0' >> $xcconfig
echo "ENABLE_BITCODE=NO" >> $xcconfig
export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"
The 6 deps are builded successfully, and the xcframeworks are imported in my XCode project, with the "embeded & sign".
Any help would be highly appreciated, i've been struggling with this issue for more than a week without any improvement.
Thanks