I’m getting the following runtime error when I try to run on a simulator, from a Mac with an M2 Max chip.
I followed the Swift instructions at Install the In-App Payments SDK installing manually. I also created the Run Script step with the following under the /bin/sh
FRAMEWORKS="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo $FRAMEWORKS
"${FRAMEWORKS}/SquareInAppPaymentsSDK.framework/setup"
Other threads pointed to not having inserted the Run Script step, which I did, but also tried running the above framework/setup manually with an error
SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/setup
+ OLDIFS='
'
++ echo ''
+ IFS=
+ IAP_SDK_FRAMEWORKS=("SquareInAppPaymentsSDK" "SquareBuyerVerificationSDK")
+ MAIN_FRAMEWORKS_DIR=/
+ SECONDARY_FRAMEWORKS_DIR=
+ for FRAMEWORK_NAME in '"${IAP_SDK_FRAMEWORKS[@]}"'
+ FRAMEWORK_PATH=SquareInAppPaymentsSDK.framework/Frameworks
+ MAIN_NESTED_FRAMEWORKS_DIR=//SquareInAppPaymentsSDK.framework/Frameworks
+ SECONDARY_NESTED_FRAMEWORKS_DIR=/SquareInAppPaymentsSDK.framework/Frameworks
+ '[' -d //SquareInAppPaymentsSDK.framework/Frameworks ']'
+ NESTED_FRAMEWORKS_DIR=/SquareInAppPaymentsSDK.framework/Frameworks
+ '[' -d /SquareInAppPaymentsSDK.framework/Frameworks ']'
+ for FRAMEWORK_NAME in '"${IAP_SDK_FRAMEWORKS[@]}"'
+ FRAMEWORK_PATH=SquareBuyerVerificationSDK.framework/Frameworks
+ MAIN_NESTED_FRAMEWORKS_DIR=//SquareBuyerVerificationSDK.framework/Frameworks
+ SECONDARY_NESTED_FRAMEWORKS_DIR=/SquareBuyerVerificationSDK.framework/Frameworks
+ '[' -d //SquareBuyerVerificationSDK.framework/Frameworks ']'
+ NESTED_FRAMEWORKS_DIR=/SquareBuyerVerificationSDK.framework/Frameworks
+ '[' -d /SquareBuyerVerificationSDK.framework/Frameworks ']'
+ SOURCE_PACKAGE_FRAMEWORK_DIR=SourcePackages/checkouts/in-app-payments-ios/XCFrameworks
+ '[' -d SourcePackages/checkouts/in-app-payments-ios/XCFrameworks ']'
+ IFS='
'
+ OLDIFS='
'
++ echo ''
+ IFS=
+ '[' '' = install ']'
+ find /Frameworks -name '*.framework'
+ read -r FILENAME
find: /Frameworks: No such file or directory
+ IFS='
'
Runtime Error:
dyld[29072]: Library not loaded: @rpath/CorePaymentCard.framework/CorePaymentCard
Referenced from: <A3C164B9-03E0-3D7E-9E2C-CD01E6DEACEC> /Users/XXX/Library/Developer/Xcode/DerivedData/XXX/Build/Products/Debug-iphonesimulator/SquareInAppPaymentsSDK.framework/SquareInAppPaymentsSDK
Reason: tried: '/XXX/Build/Products/Debug-iphonesimulator/CorePaymentCard.framework/CorePaymentCard' (no such file),
'/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (no such file),
'/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (no such file, not in dyld cache),
'/Users/XXX/Library/Developer/CoreSimulator/Devices/C870A7C4-8F7C-401F-A45E-9E3AED697CED/data/Library/Caches/com.apple.containermanagerd/Dead/temp.0SwYJ5/246F6BC6-4F5E-4DF2-BA9A-872391D4C535/XXX.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (no such file),
'/Users/XXX/Library/Developer/CoreSimulator/Devices/C870A7C4-8F7C-401F-A45E-9E3AED697CED/data/Library/Caches/com.apple.containermanagerd/Dead/temp.0SwYJ5/246F6BC6-4F5E-4DF2-BA9A-872391D4C535/XXX.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (no such file),
'/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CorePaymentCard.framework/CorePaymentCard' (no such file)