File tree Expand file tree Collapse file tree 6 files changed +70
-2
lines changed
Expand file tree Collapse file tree 6 files changed +70
-2
lines changed Original file line number Diff line number Diff line change 1+ -----BEGIN RSA PUBLIC KEY-----
2+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtAQgkh+tXn5fT3+pWuyZ
3+ LvIwPoSObko1CbZ8IBOAaPsDQXuinv2BPQ85z2ccjoM4RIJ9MSNK9iMkW3NOQRIy
4+ BVHO8bSi8HQSvm3pt3CEjCwP0o3wd1fGA/P/hHOO5Mu7iJ4isBbsgMXT0pjx0Zjg
5+ HkeR046UyCAm3cYX20lA483NpVH8g7U1LI7YfbMy66KPI0joFnLQ09FGSaVsVdeS
6+ JqaCBCB8IsYjOUPB1vwEvwCxv96APZ58cFwdeSYIzLdTtv3F6pkVpfEKLcV1KE3N
7+ nmHIIiik2UJFUidUnmQJ72HcFIF1tirrZcRr301UCZanI2nei76XtEn//jMW9+2o
8+ ZwIDAQAB
9+ -----END RSA PUBLIC KEY-----
Original file line number Diff line number Diff line change 1313 buildPhases = (
1414 326CA51322BA1A270033A92F /* Build Frameworks */,
1515 326CA51422BA25F70033A92F /* Create XCFramework */,
16+ 32F4EC0E2BEA18C400EAADD2 /* Sign XCFramework */,
1617 );
1718 dependencies = (
1819 );
11611162 shellPath = /bin/sh;
11621163 shellScript = "sh ${SRCROOT}/Scripts/create-xcframework.sh\n";
11631164 };
1165+ 32F4EC0E2BEA18C400EAADD2 /* Sign XCFramework */ = {
1166+ isa = PBXShellScriptBuildPhase;
1167+ buildActionMask = 2147483647;
1168+ files = (
1169+ );
1170+ inputFileListPaths = (
1171+ );
1172+ inputPaths = (
1173+ );
1174+ name = "Sign XCFramework";
1175+ outputFileListPaths = (
1176+ );
1177+ outputPaths = (
1178+ );
1179+ runOnlyForDeploymentPostprocessing = 0;
1180+ shellPath = /bin/sh;
1181+ shellScript = "sh ${SRCROOT}/Scripts/sign-xcframework.sh\n";
1182+ };
11641183/* End PBXShellScriptBuildPhase section */
11651184
11661185/* Begin PBXSourcesBuildPhase section */
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ set -o pipefail
55
66XCODE_VERSION=$( xcodebuild -version | head -n 1| awk -F ' ' ' {print $2}' )
77XCODE_VERSION_MAJOR=$( echo $XCODE_VERSION | awk -F ' .' ' {print $1}' )
8+ XCODE_VERSION_MINOR=$( echo $XCODE_VERSION | awk -F ' .' ' {print $2}' )
9+ XCODE_VERSION_PATCH=$( echo $XCODE_VERSION | awk -F ' .' ' {print $3}' )
810if [ -z " $SRCROOT " ]
911then
1012 SRCROOT=$( pwd)
1820 PLATFORMS+=(" macCatalyst" )
1921fi
2022
21- if [ $XCODE_VERSION_MAJOR -ge 15 ]
23+ if [[ ( $XCODE_VERSION_MAJOR -gt 15) || ( $XCODE_VERSION_MAJOR -eq 15 && $XCODE_VERSION_MINOR -ge 2) ] ]
2224then
2325 PLATFORMS+=(" visionOS" )
2426 PLATFORMS+=(" visionOSSimulator" )
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ set -o pipefail
55
66XCODE_VERSION=$( xcodebuild -version | head -n 1| awk -F ' ' ' {print $2}' )
77XCODE_VERSION_MAJOR=$( echo $XCODE_VERSION | awk -F ' .' ' {print $1}' )
8+ XCODE_VERSION_MINOR=$( echo $XCODE_VERSION | awk -F ' .' ' {print $2}' )
9+ XCODE_VERSION_PATCH=$( echo $XCODE_VERSION | awk -F ' .' ' {print $3}' )
810if [ -z " $SRCROOT " ]
911then
1012 SRCROOT=$( pwd)
2527 PLATFORMS+=(" macCatalyst" )
2628fi
2729
28- if [ $XCODE_VERSION_MAJOR -ge 15 ]
30+ if [[ ( $XCODE_VERSION_MAJOR -gt 15) || ( $XCODE_VERSION_MAJOR -eq 15 && $XCODE_VERSION_MINOR -ge 2) ] ]
2931then
3032 PLATFORMS+=(" visionOS" )
3133 PLATFORMS+=(" visionOSSimulator" )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+ set -o pipefail
5+
6+ if [ -z " $SRCROOT " ]
7+ then
8+ SRCROOT=$( pwd)
9+ fi
10+
11+ # Self-sign XCFramework
12+ if [ -z CODESIGN_KEY_BASE64 ]; then
13+ echo " Ignore Codesign XCFramework! You must sign SDWebImage before shipping to App Store. See: https://developer.apple.com/support/third-party-SDK-requirements"
14+ exit 0
15+ fi
16+
17+ KEYCHAIN=~ /Library/Keychains/ios.keychain
18+ KEYCHAIN_PASSWORD=SDWebImage
19+ CODESIGN_IDENTIFY_NAME=SDWebImage\ Signing\ Certificate
20+ KEY_PASSWORD=" "
21+
22+ echo $CODESIGN_KEY_BASE64 | base64 -D > " $( PWD) /Certificate/${CODESIGN_IDENTIFY_NAME} .p12"
23+
24+ security create-keychain -p " $KEYCHAIN_PASSWORD " ios.keychain
25+ security unlock-keychain -p " $KEYCHAIN_PASSWORD " $KEYCHAIN
26+
27+ security import " $( PWD) /Certificate/${CODESIGN_IDENTIFY_NAME} .cer" -k $KEYCHAIN -T /usr/bin/codesign -T /usr/bin/security
28+ security import " $( PWD) /Certificate/${CODESIGN_IDENTIFY_NAME} .p12" -k $KEYCHAIN -P " $KEY_PASSWORD " -T /usr/bin/codesign -T /usr/bin/security
29+ security list-keychains -s ios.keychain
30+ security set-key-partition-list -S " apple-tool:,apple:" -k " $KEYCHAIN_PASSWORD " $KEYCHAIN
31+
32+ echo " Codesign XCFramework"
33+ /usr/bin/codesign --force --timestamp -v --sign " SDWebImage Signing Certificate" " ${SRCROOT} /build/SDWebImage.xcframework"
34+
35+ rm -rf " $( PWD) /Certificate/${CODESIGN_IDENTIFY_NAME} .p12"
36+ security delete-keychain ios.keychain
You can’t perform that action at this time.
0 commit comments