From 9d3d275dca8e8dc442eb04434c8bd0fdad79bc04 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 04 Jun 2026 00:53:16 +0800
Subject: [PATCH] Freeze 2.1.28 for Mac App Store release
---
privatevoice.src/frontend/package.json | 2
Release/PrivateVoice-Dictation-2.1.28-build20260604.0049/APP_STORE_CONNECT_SUBMISSION.md | 188 +++++++++++++++++++++++
privatevoice.src/app.go | 4
privatevoice.src/scripts/build-macappstore-pkg-macos.sh | 212 ++++++++++++++++++++++++++
privatevoice.src/build/config.yml | 2
privatevoice.src/frontend/package-lock.json | 4
CHANGELOG.md | 14 +
privatevoice.src/frontend/src/components/settings/AboutPage.svelte | 2
privatevoice.src/build/darwin/Info.plist | 4
privatevoice.src/build/windows/wails.exe.manifest | 2
10 files changed, 424 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e79bb6..02bb800 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## v2.1.28 (2026-06-04)
+
+### 发布冻结
+
+- **App Store 发布冻结版本**:冻结上一轮关于页审核信息补全后的代码,准备进入 Mac App Store 发布流程。
+- **发布资料准备**:补充市场发布交接材料、App Store 元数据草稿、隐私与审核说明、构建与上传前置条件清单。
+
+### 构建
+
+- build: `20260604.0049`
+- 说明: 本版本为 Mac App Store 发布冻结基线;本机可生成 App Store sandbox POC 包,真正上传包仍需 Apple Distribution / 3rd Party Mac Developer Installer 证书与 App Store Connect 账号。
+
+---
+
## v2.1.27 (2026-06-03)
### QA 候选包
diff --git a/Release/PrivateVoice-Dictation-2.1.28-build20260604.0049/APP_STORE_CONNECT_SUBMISSION.md b/Release/PrivateVoice-Dictation-2.1.28-build20260604.0049/APP_STORE_CONNECT_SUBMISSION.md
new file mode 100644
index 0000000..02e2b5a
--- /dev/null
+++ b/Release/PrivateVoice-Dictation-2.1.28-build20260604.0049/APP_STORE_CONNECT_SUBMISSION.md
@@ -0,0 +1,188 @@
+# App Store Connect Submission Prep
+
+## Build
+
+- App: 私语输入法 / PrivateVoice Dictation
+- Bundle ID: `com.privatevoice.input`
+- Version: `2.1.28`
+- Build: `20260604.0049`
+- Platform: macOS
+- Recommended category: Productivity
+- Secondary category: Utilities
+- Minimum macOS for App Store sandbox build: `13.4`
+- Support URL: `https://shanghai3168.github.io/privatevoice-dictation-support/support.html`
+- Privacy Policy URL: `https://shanghai3168.github.io/privatevoice-dictation-support/privacy.html`
+
+## Current Local Readiness
+
+- Xcode: `26.3`
+- Upload tool: `xcrun altool 26.10.1`
+- App Store sandbox entitlements file: `privatevoice.src/build/darwin/entitlements-appstore.plist`
+- Mac App Store package script: `privatevoice.src/scripts/build-macappstore-pkg-macos.sh`
+- Local blocker: this machine does not currently have Apple App Store distribution or installer identities installed.
+
+## Required Apple Account Items
+
+1. App Store Connect app record for bundle ID `com.privatevoice.input`.
+2. Mac App Store provisioning profile for `com.privatevoice.input`.
+3. App signing certificate installed in Keychain:
+ - `Apple Distribution: <Team> (<TeamID>)`, or
+ - legacy `3rd Party Mac Developer Application: <Team> (<TeamID>)`.
+4. Installer signing certificate installed in Keychain:
+ - `3rd Party Mac Developer Installer: <Team> (<TeamID>)`.
+5. App Store Connect role with build upload permission.
+
+## Build Upload Package
+
+After the Apple certificates and provisioning profile are installed:
+
+```bash
+cd /Users/ar/Projects/PrivateVoice/privatevoice.src
+
+PRIVATEVOICE_APPSTORE_APP_IDENTITY="Apple Distribution: <Team> (<TeamID>)" \
+PRIVATEVOICE_APPSTORE_INSTALLER_IDENTITY="3rd Party Mac Developer Installer: <Team> (<TeamID>)" \
+PRIVATEVOICE_APPSTORE_PROVISIONING_PROFILE="/absolute/path/to/profile.provisionprofile" \
+ ./scripts/build-macappstore-pkg-macos.sh arm64
+```
+
+Expected package path:
+
+```text
+/Users/ar/Projects/PrivateVoice/privatevoice.src/build/macappstore/arm64/PrivateVoice-Dictation-2.1.28-build20260604.0049-arm64-macappstore.pkg
+```
+
+Validate before upload:
+
+```bash
+pkgutil --check-signature "/Users/ar/Projects/PrivateVoice/privatevoice.src/build/macappstore/arm64/PrivateVoice-Dictation-2.1.28-build20260604.0049-arm64-macappstore.pkg"
+xcrun altool --validate-app \
+ -f "/Users/ar/Projects/PrivateVoice/privatevoice.src/build/macappstore/arm64/PrivateVoice-Dictation-2.1.28-build20260604.0049-arm64-macappstore.pkg" \
+ -t macos \
+ -u "<apple-id>" \
+ -p "<app-specific-password>"
+```
+
+Upload:
+
+```bash
+xcrun altool --upload-app \
+ -f "/Users/ar/Projects/PrivateVoice/privatevoice.src/build/macappstore/arm64/PrivateVoice-Dictation-2.1.28-build20260604.0049-arm64-macappstore.pkg" \
+ -t macos \
+ -u "<apple-id>" \
+ -p "<app-specific-password>"
+```
+
+Transporter can also upload the same signed `.pkg`.
+
+## Chinese Metadata Draft
+
+### Name
+
+私语输入法
+
+### Subtitle
+
+私密离线语音输入
+
+### Promotional Text
+
+离线语音识别、自定义词库和隐私保护,适合日常写作、办公记录和中英文输入。
+
+### Description
+
+私语输入法是一款面向 macOS 的私密离线语音输入工具。按下快捷键开始说话,识别结果会自动输入到当前文本框,适合写邮件、写文档、聊天、做会议记录和处理日常办公文本。
+
+语音识别在本地设备上完成,支持 SenseVoice、Qwen3-ASR、Moonshine English、Parakeet 等本地模型。应用不会收集、上传或存储你的语音、文本、词库或使用数据。自定义词库和识别历史仅保存在本机,由你自己管理。
+
+主要功能:
+
+- 离线语音识别,数据不出设备
+- 中文、英文和中英混输场景支持
+- 自定义词库,修正常见误识别词
+- 可选择轻量默认模型或更高质量模型
+- 全局快捷键输入,适合在任意文本框使用
+- 本地识别历史,便于回看和整理
+
+本应用基于开源项目 VoiceSnap 二次开发,遵循 MIT License。完整版权声明、许可文本、隐私政策和支持方式可在支持网站查看。
+
+### Keywords
+
+语音输入,听写,离线识别,输入法,语音转文字,隐私,词库,办公,写作,中文输入
+
+### What's New
+
+补全关于页中的苹果审核信息,明确说明本地离线识别、数据不出设备、开源项目归属、版权许可、隐私政策和支持反馈入口。
+
+## English Metadata Draft
+
+### Name
+
+PrivateVoice Dictation
+
+### Subtitle
+
+Private offline voice dictation
+
+### Promotional Text
+
+Offline speech recognition, custom dictionaries, and privacy-first dictation for daily writing and productivity.
+
+### Description
+
+PrivateVoice Dictation is a private offline voice input tool for macOS. Press a hotkey, speak, and the recognized text is typed into the active text field. It is designed for writing, email, chat, notes, meeting summaries, and everyday productivity.
+
+Speech recognition is completed locally on your device with local models including SenseVoice, Qwen3-ASR, Moonshine English, and Parakeet. The app does not collect, upload, or store your voice, text, dictionary, or usage data. Custom dictionaries and recognition history stay on your Mac and remain under your control.
+
+Key features:
+
+- Offline speech recognition with data staying on device
+- Chinese, English, and mixed Chinese-English dictation workflows
+- Custom dictionary for correcting commonly misrecognized words
+- Lightweight default models and optional higher-quality models
+- Global hotkey input for use in other apps
+- Local recognition history for review and organization
+
+This app is a secondary development based on the open-source VoiceSnap project and follows the MIT License. Full copyright notices, license text, privacy policy, and support links are available on the support website.
+
+### Keywords
+
+dictation,voice input,speech to text,offline,privacy,dictionary,macOS,writing,productivity
+
+### What's New
+
+Updated the About page with App Review information covering local offline recognition, on-device data handling, open-source attribution, license details, privacy policy, and support links.
+
+## Privacy Nutrition Label Recommendation
+
+- Data Collection: Data Not Collected.
+- Tracking: No.
+- Third-party advertising: No.
+- Analytics: No.
+- Voice data: processed locally only; not collected by the developer.
+- Text/user dictionary/history: stored locally on device only; not collected by the developer.
+- Network use: model package downloads and opening support/privacy links. No voice/text/user data is uploaded.
+
+## App Review Notes
+
+```text
+PrivateVoice Dictation is a macOS offline dictation app.
+
+All speech recognition runs locally on the user's Mac. The app does not collect, upload, or store voice recordings, recognized text, user dictionary entries, recognition history, or usage analytics on any developer server.
+
+Network access is used only to download optional local speech model packages and to open the support/privacy/license pages in the user's browser. Recognition remains local after models are installed.
+
+No account or login is required.
+
+The About page includes:
+- Open-source attribution to VoiceSnap: https://github.com/vorojar/VoiceSnap
+- License/copyright details: https://shanghai3168.github.io/privatevoice-dictation-support/
+- Privacy policy: https://shanghai3168.github.io/privatevoice-dictation-support/privacy.html
+- Support and feedback: https://shanghai3168.github.io/privatevoice-dictation-support/support.html
+```
+
+## Official Apple References Checked
+
+- App Sandbox is required for Mac App Store distribution: `https://developer.apple.com/documentation/security/app-sandbox`
+- Mac App Store provisioning profile is required for manual upload signing: `https://developer.apple.com/help/account/provisioning-profiles/create-an-app-store-provisioning-profile`
+- Uploads use Xcode, altool, or Transporter: `https://developer.apple.com/help/app-store-connect/manage-builds/upload-builds/`
+- Mac App Store packaging uses signed installer packages: `https://developer.apple.com/documentation/xcode/packaging-mac-software-for-distribution`
diff --git a/privatevoice.src/app.go b/privatevoice.src/app.go
index fb75c77..080dcc5 100755
--- a/privatevoice.src/app.go
+++ b/privatevoice.src/app.go
@@ -27,8 +27,8 @@
)
const (
- appVersion = "2.1.27"
- appBuild = "20260603.2238"
+ appVersion = "2.1.28"
+ appBuild = "20260604.0049"
appDisplayVersion = appVersion + " (build " + appBuild + ")"
appName = "PrivateVoice Dictation"
diff --git a/privatevoice.src/build/config.yml b/privatevoice.src/build/config.yml
index 1cd73e0..445c3e0 100755
--- a/privatevoice.src/build/config.yml
+++ b/privatevoice.src/build/config.yml
@@ -7,7 +7,7 @@
description: "Private offline voice input tool"
copyright: "(c) 2026, PrivateVoice"
comments: "Private. Offline."
- version: "2.1.27"
+ version: "2.1.28"
dev_mode:
root_path: .
diff --git a/privatevoice.src/build/darwin/Info.plist b/privatevoice.src/build/darwin/Info.plist
index 4d72636..14af748 100755
--- a/privatevoice.src/build/darwin/Info.plist
+++ b/privatevoice.src/build/darwin/Info.plist
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.1.27</string>
+ <string>2.1.28</string>
<key>CFBundleVersion</key>
- <string>20260603.2238</string>
+ <string>20260604.0049</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSMicrophoneUsageDescription</key>
diff --git a/privatevoice.src/build/windows/wails.exe.manifest b/privatevoice.src/build/windows/wails.exe.manifest
index 13f0118..39b6209 100755
--- a/privatevoice.src/build/windows/wails.exe.manifest
+++ b/privatevoice.src/build/windows/wails.exe.manifest
@@ -3,7 +3,7 @@
<assemblyIdentity
type="win32"
name="PrivateVoice.Dictation"
- version="2.1.27.0"
+ version="2.1.28.0"
processorArchitecture="*"/>
<dependency>
<dependentAssembly>
diff --git a/privatevoice.src/frontend/package-lock.json b/privatevoice.src/frontend/package-lock.json
index fd063e5..bb49170 100755
--- a/privatevoice.src/frontend/package-lock.json
+++ b/privatevoice.src/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "privatevoice-dictation-frontend",
- "version": "2.1.27",
+ "version": "2.1.28",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "privatevoice-dictation-frontend",
- "version": "2.1.27",
+ "version": "2.1.28",
"dependencies": {
"@wailsio/runtime": "latest"
},
diff --git a/privatevoice.src/frontend/package.json b/privatevoice.src/frontend/package.json
index 839a64b..2bee831 100755
--- a/privatevoice.src/frontend/package.json
+++ b/privatevoice.src/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "privatevoice-dictation-frontend",
"private": true,
- "version": "2.1.27",
+ "version": "2.1.28",
"type": "module",
"scripts": {
"dev": "vite dev",
diff --git a/privatevoice.src/frontend/src/components/settings/AboutPage.svelte b/privatevoice.src/frontend/src/components/settings/AboutPage.svelte
index 8c814f4..65c5bf3 100644
--- a/privatevoice.src/frontend/src/components/settings/AboutPage.svelte
+++ b/privatevoice.src/frontend/src/components/settings/AboutPage.svelte
@@ -3,7 +3,7 @@
import { t } from '../../lib/i18n'
import AppIcon from '../shared/AppIcon.svelte'
- let version = $state('2.1.27 (build 20260603.2238)')
+ let version = $state('2.1.28 (build 20260604.0049)')
const currentYear = new Date().getFullYear().toString()
const aboutLinks = [
{ labelKey: 'about.sourceProjectLabel', urlKey: 'about.sourceUrl' },
diff --git a/privatevoice.src/scripts/build-macappstore-pkg-macos.sh b/privatevoice.src/scripts/build-macappstore-pkg-macos.sh
new file mode 100755
index 0000000..e048971
--- /dev/null
+++ b/privatevoice.src/scripts/build-macappstore-pkg-macos.sh
@@ -0,0 +1,212 @@
+#!/usr/bin/env bash
+#
+# build-macappstore-pkg-macos.sh - Build a Mac App Store upload package.
+#
+# This script uses the App Store sandbox build path, signs the app with an
+# Apple-issued distribution identity, embeds the Mac App Store provisioning
+# profile, then packages the app as a signed .pkg for App Store Connect upload.
+#
+# Required environment:
+# PRIVATEVOICE_APPSTORE_APP_IDENTITY
+# Example: "Apple Distribution: Example Team (TEAMID)"
+# Legacy: "3rd Party Mac Developer Application: Example Team (TEAMID)"
+#
+# PRIVATEVOICE_APPSTORE_INSTALLER_IDENTITY
+# Example: "3rd Party Mac Developer Installer: Example Team (TEAMID)"
+#
+# PRIVATEVOICE_APPSTORE_PROVISIONING_PROFILE
+# Path to the Mac App Store provisioning profile for com.privatevoice.input.
+#
+# Optional environment:
+# PRIVATEVOICE_SIGNING_KEYCHAIN
+# PRIVATEVOICE_APPSTORE_MIN_SYSTEM_VERSION (default: 13.4)
+#
+# Usage:
+# cd privatevoice.src
+# PRIVATEVOICE_APPSTORE_APP_IDENTITY="Apple Distribution: ..." \
+# PRIVATEVOICE_APPSTORE_INSTALLER_IDENTITY="3rd Party Mac Developer Installer: ..." \
+# PRIVATEVOICE_APPSTORE_PROVISIONING_PROFILE="/path/to/profile.provisionprofile" \
+# ./scripts/build-macappstore-pkg-macos.sh arm64
+#
+set -euo pipefail
+
+APP_NAME="PrivateVoice Dictation"
+APPSTORE_APP_IDENTITY="${PRIVATEVOICE_APPSTORE_APP_IDENTITY:-}"
+APPSTORE_INSTALLER_IDENTITY="${PRIVATEVOICE_APPSTORE_INSTALLER_IDENTITY:-}"
+APPSTORE_PROVISIONING_PROFILE="${PRIVATEVOICE_APPSTORE_PROVISIONING_PROFILE:-}"
+SIGNING_KEYCHAIN="${PRIVATEVOICE_SIGNING_KEYCHAIN:-}"
+APPSTORE_MIN_SYSTEM_VERSION="${PRIVATEVOICE_APPSTORE_MIN_SYSTEM_VERSION:-13.4}"
+
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
+
+INFO_PLIST="$PROJECT_DIR/build/darwin/Info.plist"
+ENTITLEMENTS="$PROJECT_DIR/build/darwin/entitlements-appstore.plist"
+GOMODCACHE="$(go env GOMODCACHE)"
+SHERPA_MACOS_MODULE_VERSION="$(cd "$PROJECT_DIR" && go list -m -f '{{.Version}}' github.com/k2-fsa/sherpa-onnx-go-macos)"
+
+VERSION="$(defaults read "$INFO_PLIST" CFBundleShortVersionString 2>/dev/null || echo "2.1.0")"
+BUILD_ID="$(defaults read "$INFO_PLIST" CFBundleVersion 2>/dev/null || date +%Y%m%d.%H%M)"
+
+step() {
+ echo ""
+ echo "==> $1"
+}
+
+fail() {
+ echo "ERROR: $1" >&2
+ exit 1
+}
+
+security_find_code_identities() {
+ if [[ -n "$SIGNING_KEYCHAIN" ]]; then
+ security find-identity -v -p codesigning "$SIGNING_KEYCHAIN"
+ else
+ security find-identity -v -p codesigning
+ fi
+}
+
+security_find_installer_identities() {
+ # Installer identities are not codesigning identities; do not filter with -p.
+ if [[ -n "$SIGNING_KEYCHAIN" ]]; then
+ security find-identity -v "$SIGNING_KEYCHAIN"
+ else
+ security find-identity -v
+ fi
+}
+
+resolve_arch() {
+ local target="$1"
+ case "$target" in
+ arm64)
+ GOARCH="arm64"
+ SHERPA_ARCH="aarch64-apple-darwin"
+ OUT_ARCH="arm64"
+ ;;
+ x86_64|amd64)
+ GOARCH="amd64"
+ SHERPA_ARCH="x86_64-apple-darwin"
+ OUT_ARCH="x86_64"
+ ;;
+ *)
+ fail "Unknown architecture: $target (use arm64 or x86_64)"
+ ;;
+ esac
+
+ BUILD_DIR="$PROJECT_DIR/build/macappstore/$OUT_ARCH"
+ APP_BUNDLE="$BUILD_DIR/$APP_NAME.app"
+ PKG_PATH="$BUILD_DIR/PrivateVoice-Dictation-$VERSION-build$BUILD_ID-$OUT_ARCH-macappstore.pkg"
+ SHERPA_LIB_DIR="$GOMODCACHE/github.com/k2-fsa/sherpa-onnx-go-macos@$SHERPA_MACOS_MODULE_VERSION/lib/$SHERPA_ARCH"
+ ONNXRUNTIME_DYLIB=""
+ ONNXRUNTIME_DYLIB_NAME=""
+}
+
+sign_plain() {
+ local item="$1"
+ codesign --force \
+ --options runtime \
+ --timestamp \
+ --sign "$APPSTORE_APP_IDENTITY" \
+ "$item"
+}
+
+sign_sandboxed() {
+ local item="$1"
+ codesign --force \
+ --options runtime \
+ --timestamp \
+ --entitlements "$ENTITLEMENTS" \
+ --sign "$APPSTORE_APP_IDENTITY" \
+ "$item"
+}
+
+TARGET_ARCH="${1:-$(uname -m)}"
+resolve_arch "$TARGET_ARCH"
+
+step "Preflight checks"
+[[ -n "$APPSTORE_APP_IDENTITY" ]] || fail "PRIVATEVOICE_APPSTORE_APP_IDENTITY is required"
+[[ -n "$APPSTORE_INSTALLER_IDENTITY" ]] || fail "PRIVATEVOICE_APPSTORE_INSTALLER_IDENTITY is required"
+[[ -n "$APPSTORE_PROVISIONING_PROFILE" ]] || fail "PRIVATEVOICE_APPSTORE_PROVISIONING_PROFILE is required"
+[[ -f "$APPSTORE_PROVISIONING_PROFILE" ]] || fail "Provisioning profile not found: $APPSTORE_PROVISIONING_PROFILE"
+[[ -f "$INFO_PLIST" ]] || fail "Info.plist not found at $INFO_PLIST"
+[[ -f "$ENTITLEMENTS" ]] || fail "App Store entitlements not found at $ENTITLEMENTS"
+[[ -f "$PROJECT_DIR/build/darwin/icon.icns" ]] || fail "icon.icns not found"
+[[ -d "$SHERPA_LIB_DIR" ]] || fail "sherpa-onnx dylibs not found at $SHERPA_LIB_DIR"
+ONNXRUNTIME_DYLIB="$(find "$SHERPA_LIB_DIR" -maxdepth 1 -type f -name 'libonnxruntime.*.dylib' | sort | tail -n 1)"
+[[ -f "$ONNXRUNTIME_DYLIB" ]] || fail "onnxruntime dylib not found in $SHERPA_LIB_DIR"
+ONNXRUNTIME_DYLIB_NAME="$(basename "$ONNXRUNTIME_DYLIB")"
+security_find_code_identities | grep -Fq "$APPSTORE_APP_IDENTITY" ||
+ fail "App Store app signing identity not found: $APPSTORE_APP_IDENTITY"
+security_find_installer_identities | grep -Fq "$APPSTORE_INSTALLER_IDENTITY" ||
+ fail "App Store installer signing identity not found: $APPSTORE_INSTALLER_IDENTITY"
+command -v productbuild >/dev/null || fail "productbuild not found"
+command -v pkgutil >/dev/null || fail "pkgutil not found"
+
+step "Cleaning old Mac App Store build"
+rm -rf "$BUILD_DIR"
+mkdir -p "$BUILD_DIR"
+
+step "Building frontend"
+cd "$PROJECT_DIR/frontend"
+if [[ ! -d node_modules ]]; then
+ npm ci --prefer-offline
+fi
+npm run build
+
+step "Building Go binary ($OUT_ARCH, appstore tag)"
+cd "$PROJECT_DIR"
+CGO_ENABLED=1 GOOS=darwin GOARCH="$GOARCH" \
+ MACOSX_DEPLOYMENT_TARGET="$APPSTORE_MIN_SYSTEM_VERSION" \
+ CGO_CFLAGS="${CGO_CFLAGS:-} -mmacosx-version-min=$APPSTORE_MIN_SYSTEM_VERSION" \
+ CGO_LDFLAGS="${CGO_LDFLAGS:-} -mmacosx-version-min=$APPSTORE_MIN_SYSTEM_VERSION" \
+ go build -tags appstore -buildvcs=false -gcflags=all="-l" -ldflags="-s -w" \
+ -o "$BUILD_DIR/$APP_NAME"
+
+step "Assembling $APP_NAME.app"
+mkdir -p "$APP_BUNDLE/Contents/MacOS"
+mkdir -p "$APP_BUNDLE/Contents/Frameworks"
+mkdir -p "$APP_BUNDLE/Contents/Resources"
+
+cp "$INFO_PLIST" "$APP_BUNDLE/Contents/Info.plist"
+/usr/libexec/PlistBuddy -c "Set :LSMinimumSystemVersion $APPSTORE_MIN_SYSTEM_VERSION" \
+ "$APP_BUNDLE/Contents/Info.plist"
+cp "$APPSTORE_PROVISIONING_PROFILE" "$APP_BUNDLE/Contents/embedded.provisionprofile"
+cp "$BUILD_DIR/$APP_NAME" "$APP_BUNDLE/Contents/MacOS/$APP_NAME"
+cp "$PROJECT_DIR/build/darwin/icon.icns" "$APP_BUNDLE/Contents/Resources/icon.icns"
+find "$PROJECT_DIR/build/darwin" -maxdepth 1 -type d -name "*.lproj" \
+ -exec cp -R {} "$APP_BUNDLE/Contents/Resources/" \;
+cp "$SHERPA_LIB_DIR/libsherpa-onnx-c-api.dylib" "$APP_BUNDLE/Contents/Frameworks/"
+cp "$ONNXRUNTIME_DYLIB" "$APP_BUNDLE/Contents/Frameworks/"
+
+step "Fixing rpaths"
+install_name_tool -add_rpath @executable_path/../Frameworks \
+ "$APP_BUNDLE/Contents/MacOS/$APP_NAME" 2>/dev/null || true
+install_name_tool -id @rpath/libsherpa-onnx-c-api.dylib \
+ "$APP_BUNDLE/Contents/Frameworks/libsherpa-onnx-c-api.dylib"
+install_name_tool -id "@rpath/$ONNXRUNTIME_DYLIB_NAME" \
+ "$APP_BUNDLE/Contents/Frameworks/$ONNXRUNTIME_DYLIB_NAME"
+
+step "Code signing for Mac App Store"
+sign_plain "$APP_BUNDLE/Contents/Frameworks/$ONNXRUNTIME_DYLIB_NAME"
+sign_plain "$APP_BUNDLE/Contents/Frameworks/libsherpa-onnx-c-api.dylib"
+sign_sandboxed "$APP_BUNDLE/Contents/MacOS/$APP_NAME"
+sign_sandboxed "$APP_BUNDLE"
+
+step "Verifying app signature and entitlements"
+codesign -vvv --deep --strict "$APP_BUNDLE"
+codesign -d --entitlements :- "$APP_BUNDLE"
+
+step "Creating signed installer package"
+productbuild \
+ --sign "$APPSTORE_INSTALLER_IDENTITY" \
+ --component "$APP_BUNDLE" /Applications \
+ "$PKG_PATH"
+
+step "Verifying installer package signature"
+pkgutil --check-signature "$PKG_PATH"
+
+step "Mac App Store package complete"
+echo " App: $APP_BUNDLE"
+echo " PKG: $PKG_PATH"
+echo " App signing identity: $APPSTORE_APP_IDENTITY"
+echo " Installer signing identity: $APPSTORE_INSTALLER_IDENTITY"
--
Gitblit v1.9.3