Ariver
2026-06-05 8cd205ee7e12a2b46d6beff6e5a6434c4862af24
Strip quarantine attributes from App Store package
3 files modified
29 ■■■■■ changed files
privatevoice.src/app.go 2 ●●● patch | view | raw | blame | history
privatevoice.src/build/darwin/Info.plist 2 ●●● patch | view | raw | blame | history
privatevoice.src/scripts/build-macappstore-pkg-macos.sh 25 ●●●●● patch | view | raw | blame | history
privatevoice.src/app.go
@@ -28,7 +28,7 @@
const (
    appVersion        = "2.1.28"
    appBuild          = "20260605.0216"
    appBuild          = "20260605.0236"
    appDisplayVersion = appVersion + " (build " + appBuild + ")"
    appName           = "PrivateVoice Dictation"
privatevoice.src/build/darwin/Info.plist
@@ -19,7 +19,7 @@
    <key>CFBundleShortVersionString</key>
    <string>2.1.28</string>
    <key>CFBundleVersion</key>
    <string>20260605.0216</string>
    <string>20260605.0236</string>
    <key>LSApplicationCategoryType</key>
    <string>public.app-category.productivity</string>
    <key>LSMinimumSystemVersion</key>
privatevoice.src/scripts/build-macappstore-pkg-macos.sh
@@ -129,6 +129,23 @@
  /usr/libexec/PlistBuddy -c "Add :$key string $value" "$plist"
}
strip_extended_attributes() {
  local item="$1"
  if command -v xattr >/dev/null; then
    xattr -cr "$item" 2>/dev/null || true
  fi
}
assert_no_quarantine_attributes() {
  local item="$1"
  if command -v xattr >/dev/null; then
    local found
    found="$(xattr -lr "$item" 2>/dev/null | grep -F "com.apple.quarantine" | head -n 20 || true)"
    [[ -z "$found" ]] || fail "com.apple.quarantine attributes remain under $item:
$found"
  fi
}
TARGET_ARCH="${1:-$(uname -m)}"
resolve_arch "$TARGET_ARCH"
@@ -210,6 +227,10 @@
cp "$SHERPA_LIB_DIR/libsherpa-onnx-c-api.dylib" "$APP_BUNDLE/Contents/Frameworks/"
cp "$ONNXRUNTIME_DYLIB" "$APP_BUNDLE/Contents/Frameworks/"
step "Removing extended attributes from app bundle"
strip_extended_attributes "$APP_BUNDLE"
assert_no_quarantine_attributes "$APP_BUNDLE"
step "Fixing rpaths"
install_name_tool -add_rpath @executable_path/../Frameworks \
  "$APP_BUNDLE/Contents/MacOS/$APP_NAME" 2>/dev/null || true
@@ -224,6 +245,10 @@
sign_sandboxed "$APP_BUNDLE/Contents/MacOS/$APP_NAME"
sign_sandboxed "$APP_BUNDLE"
step "Removing extended attributes after signing"
strip_extended_attributes "$APP_BUNDLE"
assert_no_quarantine_attributes "$APP_BUNDLE"
step "Verifying app signature and entitlements"
codesign -vvv --deep --strict "$APP_BUNDLE"
codesign -d --entitlements :- "$APP_BUNDLE"