Hi While trying to archive the app with the IOS Build I keep getting an error - Code signing “CorePaymentCard.framework” failed.
Kindly help to proceed. I have also enclosed the screenshot for reference.
Hi While trying to archive the app with the IOS Build I keep getting an error - Code signing “CorePaymentCard.framework” failed.
Kindly help to proceed. I have also enclosed the screenshot for reference.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Square Developer Documentation
Build on iOS: In-App Payments SDK
Build on iOS: Point of Sale API
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Sure, I’ll check out the provided links.
This error typically occurs when there’s an issue with the code signing of the framework. Here are a few steps you can try:
Ensure that you have the correct provisioning profile and certificate set in your Xcode project settings.
Make sure that the “Automatically manage signing” option is checked in your Xcode project settings.
Try cleaning your project (Product → Clean Build Folder) and then archive again.
If you’re using Cocoapods, ensure that the framework is included in the “Embed Frameworks” build phase of your target.
Check if the framework is set to “Do Not Embed” in the General tab of your target settings.
If the issue persists, you might need to manually sign the framework. You can do this by going to the “Build Phases” tab in your target settings, and adding a new “Run Script” phase with the following command:
codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements --timestamp=none ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/CorePaymentCard.framework
Replace CorePaymentCard.framework
with the correct path to your framework if necessary. This script will manually sign the framework with your app’s signing identity.
This answer was reviewed by @Bryan-Square.
The issue is only while archiving the build,Am able to build and run the app. Whenever I add the runscript in the build settings, The build fails to archive and I get the following error - line 132: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code… If the run script is removed I get Code signing “CorePaymentCard.framework” failed.
The error you are encountering, line 132: ARCHS[@]: unbound variable
, typically indicates that the ARCHS
array variable is being referenced in your script, but it has not been properly initialized or defined. This can happen if there is a conditional logic that skips the initialization of ARCHS
under certain circumstances or if the script assumes ARCHS
is always set by the environment.
Have you tried any of the following?
ARCHS
: Ensure that the ARCHS
variable is properly initialized before it is used. For example:if [ -z "${ARCHS+x}" ]; then
ARCHS=()
fi
ARCHS
before the line that fails:echo "ARCHS: ${ARCHS[@]}"
ARCHS
: Set a default value for ARCHS
if it is not set by the environment:ARCHS=${ARCHS:-"arm64 armv7"}
#!/bin/bash
instead of #!/bin/sh
.ARCHS
under certain conditions.Code signing “CorePaymentCard.framework” failed
, suggests there might be a problem with your code signing settings. Ensure that:Fine @Bryan-Square, Thanks for the guidance … I’ll give it a try and get back here If am facing any further issues.