fix(ios): show screen-audio broadcast extension in picker

The broadcast upload extension never appeared in the iOS broadcast picker
(or Control Center screen-recording list) because its Info.plist set
RPBroadcastProcessMode to the invalid string "BroadcastUpload". iOS only
recognises "RPBroadcastProcessModeSampleBuffer" for a sample-buffer upload
extension and silently rejects any other value, hiding the extension.

Also sign VoiceCatCore.xcframework in build-xcframework.sh: Xcode 15+ rejects
unsigned binary XCFrameworks consumed as SwiftPM binary targets. Signs with
CODESIGN_IDENTITY, else the first Apple Development identity, else ad-hoc.
This commit is contained in:
2026-06-21 02:08:57 +02:00
parent 8c90e250f0
commit ef88af14c2
2 changed files with 16 additions and 1 deletions

View File

@@ -25,7 +25,7 @@
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).SampleHandler</string>
<key>RPBroadcastProcessMode</key>
<string>BroadcastUpload</string>
<string>RPBroadcastProcessModeSampleBuffer</string>
</dict>
</dict>
</plist>

View File

@@ -155,5 +155,20 @@ xcodebuild -create-xcframework "${args[@]}" -output "$OUTPUT"
# Clean up staged headers (the xcframework has its own copy now).
rm -rf "$STAGED_ROOT"
# ── Code-sign ────────────────────────────────────────────────────────────────────
# Xcode 15+ rejects unsigned binary XCFrameworks consumed as SwiftPM binary targets
# ("The Framework VoiceCatCore.xcframework is unsigned."). Sign with CODESIGN_IDENTITY
# if set, else the first "Apple Development" identity in the keychain, else ad-hoc ("-").
# The .xcframework is a local build artifact (gitignored), so signing with the local
# developer identity is fine and not committed.
SIGN_ID="${CODESIGN_IDENTITY:-}"
if [[ -z "$SIGN_ID" ]]; then
SIGN_ID="$(security find-identity -v -p codesigning 2>/dev/null \
| awk '/Apple Development/{print $2; exit}')"
fi
SIGN_ID="${SIGN_ID:--}" # fall back to ad-hoc
codesign --force --timestamp=none --sign "$SIGN_ID" "$OUTPUT"
echo "[build-xcframework] signed with identity: $SIGN_ID"
echo "[build-xcframework] done -> $OUTPUT"
xcodebuild -list -xcframework "$OUTPUT" 2>/dev/null || true