mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-07-03 12:27:41 +08:00
### What this PR does Before this PR: - macOS users with the old code signing Team ID (Q24M7JR***) cannot auto-update to v1.8.0+ due to signing certificate change - Update request headers lacked app identification information After this PR: - Detects old Team ID on macOS and shows a manual download button directing users to the official website - Adds `App-Name`, `App-Version`, and `OS` headers to update requests for better server analytics - Refactors duplicate headers into a shared `getCommonHeaders()` function ### Why we need it and why it was done in this way The following tradeoffs were made: - Using `codesign -dv` to detect the Team ID at runtime is simple and reliable on macOS The following alternatives were considered: - Checking the app version instead of Team ID, but this wouldn't correctly identify users who haven't updated in a while ### Breaking changes None ### Special notes for your reviewer The old Team ID `Q24M7JR2C4` is hardcoded as a constant. This is intentional since it represents the previous signing certificate that will no longer be used. ### Checklist - [x] PR: The PR description is expressive enough and will help future contributors - [x] Code: Write code that humans can understand and Keep it simple - [x] Refactor: You have left the code cleaner than you found it (Boy Scout Rule) - [x] Upgrade: Impact of this change on upgrade flows was considered and addressed if required - [x] Documentation: A user-guide update was considered and is present (link) or not required - [x] Self-review: I have reviewed my own code before requesting review from others ### Release note ```release-note Add manual download option for macOS users who cannot auto-update due to code signing certificate change ``` --------- Signed-off-by: kangfenmao <kangfenmao@qq.com>