4444 BASE_BRANCH : ${{ github.event.inputs.base_branch }}
4545 RELEASE_BRANCH : ${{ needs.prep.outputs.release_branch }}
4646 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47+ # Single source of truth for the XCFrameworks the Code Sign and Verify steps
48+ # operate on (paths relative to iOS_SDK/OneSignalSDK). Keep in sync with the
49+ # frameworks built by build_all_frameworks.sh.
50+ XCFRAMEWORKS : >-
51+ OneSignal_Core/OneSignalCore.xcframework
52+ OneSignal_OSCore/OneSignalOSCore.xcframework
53+ OneSignal_Outcomes/OneSignalOutcomes.xcframework
54+ OneSignal_Extension/OneSignalExtension.xcframework
55+ OneSignal_Notifications/OneSignalNotifications.xcframework
56+ OneSignal_User/OneSignalUser.xcframework
57+ OneSignal_LiveActivities/OneSignalLiveActivities.xcframework
58+ OneSignal_Location/OneSignalLocation.xcframework
59+ OneSignal_InAppMessages/OneSignalInAppMessages.xcframework
60+ OneSignal_XCFramework/OneSignalFramework.xcframework
4761
4862 steps :
4963 - name : 📋 Display Configuration
@@ -75,21 +89,13 @@ jobs:
7589 with :
7690 xcode-version : " 15.2"
7791
78- - name : Install the Apple distribution certificate and provisioning profile (OneSignal)
92+ - name : Install the Apple distribution certificate (OneSignal)
7993 uses : apple-actions/import-codesign-certs@v2
8094 with :
8195 keychain-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
8296 p12-file-base64 : ${{ secrets.CERTIFICATES_P12 }}
8397 p12-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
8498
85- - name : Install the Apple distribution certificate and provisioning profile (Lilomi)
86- uses : apple-actions/import-codesign-certs@v2
87- with :
88- create-keychain : false # do not create a new keychain for this value
89- keychain-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
90- p12-file-base64 : ${{ secrets.DEV_CERTIFICATES_P12 }}
91- p12-password : ${{ secrets.DEV_CERTIFICATES_P12_PASSWORD }}
92-
9399 - name : Update Version in SDK and Podspec Files
94100 run : |
95101 cd iOS_SDK/OneSignalSDK
@@ -112,16 +118,41 @@ jobs:
112118 - name : Code Sign
113119 run : |
114120 cd iOS_SDK/OneSignalSDK
115- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Core/OneSignalCore.xcframework
116- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Extension/OneSignalExtension.xcframework
117- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_InAppMessages/OneSignalInAppMessages.xcframework
118- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Location/OneSignalLocation.xcframework
119- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Notifications/OneSignalNotifications.xcframework
120- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_OSCore/OneSignalOSCore.xcframework
121- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Outcomes/OneSignalOutcomes.xcframework
122- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_User/OneSignalUser.xcframework
123- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_XCFramework/OneSignalFramework.xcframework
124- codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_LiveActivities/OneSignalLiveActivities.xcframework
121+ set -e
122+ IDENTITY="Apple Distribution: OneSignal, Inc. (J3J28YJX9L)"
123+ for XCF in $XCFRAMEWORKS; do
124+ # Sign inside-out: each slice's .framework binary first, then the
125+ # .xcframework wrapper. -f replaces the linker's ad-hoc signature left
126+ # by the unsigned archive build, so both inner and outer end up signed
127+ # with the official OneSignal Apple Distribution identity.
128+ while IFS= read -r FW; do
129+ echo "Signing inner framework: $FW"
130+ codesign --timestamp -f -v --sign "$IDENTITY" "$FW"
131+ done < <(find "$XCF" -type d -name "*.framework")
132+ echo "Signing wrapper: $XCF"
133+ codesign --timestamp -f -v --sign "$IDENTITY" "$XCF"
134+ done
135+ shell : bash
136+
137+ - name : Verify Code Signing
138+ run : |
139+ cd iOS_SDK/OneSignalSDK
140+ set -e
141+ # Fail the release if any slice or wrapper is tampered/unsigned or not
142+ # signed by the OneSignal team. --deep is unreliable across xcframework
143+ # slices, so each inner .framework is verified explicitly.
144+ REQUIREMENT="anchor apple generic and certificate leaf[subject.OU] = J3J28YJX9L"
145+ for XCF in $XCFRAMEWORKS; do
146+ while IFS= read -r FW; do
147+ echo "Verifying inner framework: $FW"
148+ codesign --verify --strict --verbose=2 "$FW"
149+ codesign --verify -R="$REQUIREMENT" "$FW"
150+ done < <(find "$XCF" -type d -name "*.framework")
151+ echo "Verifying wrapper: $XCF"
152+ codesign --verify --strict --verbose=2 "$XCF"
153+ codesign --verify -R="$REQUIREMENT" "$XCF"
154+ done
155+ echo "All XCFrameworks verified: intact and signed by OneSignal (J3J28YJX9L)."
125156 shell : bash
126157
127158 - name : Commit Build and Push Changes
0 commit comments