Skip to content

fix: add Build Phase to sign frameworks with ad-hoc#36

Merged
hubo1989 merged 2 commits into
mainfrom
feat/v1.3.0
Feb 27, 2026
Merged

fix: add Build Phase to sign frameworks with ad-hoc#36
hubo1989 merged 2 commits into
mainfrom
feat/v1.3.0

Conversation

@hubo1989
Copy link
Copy Markdown
Owner

@hubo1989 hubo1989 commented Feb 27, 2026

Summary

  • Added PBXShellScriptBuildPhase to re-sign embedded frameworks with ad-hoc
  • Fixes 'different Team IDs' error when using ad-hoc signing
  • Sparkle.framework needs matching signature with main app

Issue

App crashed on launch with: mapping process and mapped file have different Team IDs

Solution

Run Script Build Phase that signs all frameworks in Contents/Frameworks with ad-hoc signature when building with ad-hoc signing.

Summary by CodeRabbit

改进

  • Bug Fixes

    • 增强了屏幕录制权限检测的可靠性,增加了备用检测机制,以确保在各种系统配置下都能正确识别权限状态。
  • Build Improvements

    • 优化了应用代码签名流程,改进了构建配置设置。

Hubert and others added 2 commits February 27, 2026 22:45
- Remove CODE_SIGNING_REQUIRED=NO and CODE_SIGNING_ALLOWED=NO
- Add explicit codesign --force --sign - for app bundle
- Ensures consistent signing across builds for permission persistence

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
- Added PBXShellScriptBuildPhase to re-sign embedded frameworks
- Fixes 'different Team IDs' error when using ad-hoc signing
- Sparkle.framework needs matching signature with main app

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ba1e0a and 29cc5ca.

📒 Files selected for processing (4)
  • .github/workflows/release.yml
  • ScreenTranslate.xcodeproj/project.pbxproj
  • ScreenTranslate/Features/Onboarding/OnboardingViewModel.swift
  • ScreenTranslate/Features/Settings/SettingsViewModel.swift

📝 Walkthrough

Walkthrough

本PR调整了iOS应用的代码签名策略,从显式禁用改为自动签名风格,并为框架签名添加了新的构建阶段。同时改进了屏幕录制权限检查逻辑,采用多重验证方法以提升可靠性。

Changes

Cohort / File(s) Summary
代码签名工作流
.github/workflows/release.yml
移除CODE_SIGNING_REQUIRED和CODE_SIGNING_ALLOWED标志,采用CODE_SIGN_STYLE=Automatic,并新增ad-hoc签名步骤在DMG打包前对应用包进行签名。
Xcode项目配置
ScreenTranslate.xcodeproj/project.pbxproj
新增"Sign Frameworks"构建阶段(SC000020)用于ad-hoc签名嵌入框架;CODE_SIGN_STYLE从Automatic改为Manual;DEVELOPMENT_TEAM和PROVISIONING_PROFILE_SPECIFIER置空。
权限检查优化
ScreenTranslate/Features/Onboarding/OnboardingViewModel.swift, ScreenTranslate/Features/Settings/SettingsViewModel.swift
添加私有方法checkScreenRecordingPermission(),结合CGPreflightScreenCaptureAccess()和CGWindowListCopyWindowInfo窗口计数的双重验证机制来确定屏幕录制权限。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 兔子欢呼代码新,签名流程更聪慧,
窗口计数显权限,双重验证真靠谱,
框架签署自动化,构建流程更顺利!

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/v1.3.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hubo1989 hubo1989 merged commit 88c24ff into main Feb 27, 2026
1 check was pending
@hubo1989 hubo1989 deleted the feat/v1.3.0 branch February 27, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant