From 201096d7bf9d41a89118d33f1503169932edffbe Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 7 May 2024 16:08:42 +0800 Subject: [PATCH] Added self-sign for XCFramework The private key is only available during GitHub Action release pipeline --- .../SDWebImage Signing Certificate.cer | Bin 0 -> 976 bytes .../SDWebImage Signing Certificate.pem | 9 +++++ SDWebImage.xcodeproj/project.pbxproj | 19 +++++++++ Scripts/build-frameworks.sh | 4 +- Scripts/create-xcframework.sh | 4 +- Scripts/sign-xcframework.sh | 36 ++++++++++++++++++ 6 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 Certificate/SDWebImage Signing Certificate.cer create mode 100644 Certificate/SDWebImage Signing Certificate.pem create mode 100755 Scripts/sign-xcframework.sh diff --git a/Certificate/SDWebImage Signing Certificate.cer b/Certificate/SDWebImage Signing Certificate.cer new file mode 100644 index 0000000000000000000000000000000000000000..463f0982c5624419c2bd200ae3ce811b00568c20 GIT binary patch literal 976 zcmXqLVm@Qg#I$7rGZP~d6CymSTU)S{Biw9Mqhl2k)s13{2NE*>s~LPJ3VevlwH4@Yona%oX! zNu?pT0Vha^O_(V(*ihL(5pE+VqnJoeW>rRMeom&Lp^=#b5bGu9=Nia~^BS2Lm>QTH zm>V0KT1El6rbygD;>spQCFI~^WMyD(V&rEqXkz4IYGPz$*utVPNq%iyUA%w&%BVLp z^*$Ncwe;nAnR0HcQ4ns(_|5ECy=dOwMq7T%^XW2u%@!_AwT8-G-;`CNi~Sshj93HD zecZC>Ly6G7+?U%6T6%Q&FZF&X4?o8I`F~4s-;>k3JLV~E5PQ>b^zx+{A1}^$Am={u za^I8_3Tk(ciQo2gczpKk(!f8>TTONPZq#lzdcCM$+2e&+(S^$w-8`4(gkGPdwycRo zp+@PLvZeFEYkyewGi=;{ufcX+O+k!or5eYX?ZMmr9(^@abm>Pf-J_)%zGvqpo>0e!qEcX5FigYGsMh3>k zo(Ap)e8BjZa2I8xN_&f$&Y#iEbjI6Be%*+O|AaOnxF%}W?q=GrV z)3=IbpV?rmur#Py`23$&$bk(^tH8i!WSF#C)*v)w<`TI=@g4C#9J2qDPiKmh=}xSO z5W1Q+Pvm;a)hM;N64oWlSpuW0OnzLxlo)ccZ~vTQ9(P}|R14QuC_P%?T9Fj+-MIb2 z^`%;~-Dm2u7)|z`XSgV&-p!#Y?YLp>)CKyJ(x**u+nnCb{62H~qs$#b5&w(UN0=}5 zjM!bZ`r_WhuU-Ff3*_JSp5Df@wV)+%zS9%+65HMd3;Axf}3L>X}Y2->5eI#Fe0xhjmMzTCMz5aCxC "$(PWD)/Certificate/${CODESIGN_IDENTIFY_NAME}.p12" + +security create-keychain -p "$KEYCHAIN_PASSWORD" ios.keychain +security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN + +security import "$(PWD)/Certificate/${CODESIGN_IDENTIFY_NAME}.cer" -k $KEYCHAIN -T /usr/bin/codesign -T /usr/bin/security +security import "$(PWD)/Certificate/${CODESIGN_IDENTIFY_NAME}.p12" -k $KEYCHAIN -P "$KEY_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security +security list-keychains -s ios.keychain +security set-key-partition-list -S "apple-tool:,apple:" -k "$KEYCHAIN_PASSWORD" $KEYCHAIN + +echo "Codesign XCFramework" +/usr/bin/codesign --force --timestamp -v --sign "SDWebImage Signing Certificate" "${SRCROOT}/build/SDWebImage.xcframework" + +rm -rf "$(PWD)/Certificate/${CODESIGN_IDENTIFY_NAME}.p12" +security delete-keychain ios.keychain \ No newline at end of file