Created
November 7, 2025 08:44
-
-
Save adityadaniel/c865a9cc0267d43d4efe2da0703a1337 to your computer and use it in GitHub Desktop.
python xcframework codesign
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -e | |
| echo "======================================" | |
| echo "Signing Python Framework and Libraries" | |
| echo "======================================" | |
| # Only sign for non-simulator builds | |
| if [[ "${PLATFORM_NAME}" == *"simulator"* ]]; then | |
| echo "Skipping signing for simulator build" | |
| exit 0 | |
| fi | |
| # Check if we have a signing identity | |
| if [ -z "$EXPANDED_CODE_SIGN_IDENTITY" ]; then | |
| echo "No signing identity found, skipping signing" | |
| exit 0 | |
| fi | |
| echo "Signing as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY)" | |
| # Sign the main Python framework | |
| PYTHON_FRAMEWORK="$CODESIGNING_FOLDER_PATH/Contents/Frameworks/Python.framework" | |
| if [ -d "$PYTHON_FRAMEWORK" ]; then | |
| echo "Signing Python.framework..." | |
| /usr/bin/codesign --force --deep --sign "$EXPANDED_CODE_SIGN_IDENTITY" \ | |
| --options runtime \ | |
| --timestamp \ | |
| "$PYTHON_FRAMEWORK" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment