Mac菜单栏应用仅公证版启动崩溃:无法获取进程文本偏移
macOS菜单栏应用归档公证后启动崩溃问题
我正在开发一款macOS菜单栏应用,归档、公证并导出到Applications文件夹后启动即崩溃。使用Console应用查看,报错信息如下:
myapp[30188]: AppSandbox request successful Channel could not return listener port. activating connection: mach=false listener=false peer=false name=com.apple.hiservices-xpcservice activating connection: mach=true listener=false peer=false name=com.apple.window_proxies invalidated because the current process cancelled the connection by calling xpc_connection_cancel() [app<application.com.myapp.15235459.15235465(501)>:30188] termination reported by launchd (2, 5, 5) failed to fetch /Applications/myapp.app/Contents/_CodeSignature/CodeRequirements-1 error=-10 failed to get text offset for /Applications/myapp.app/Contents/MacOS/myapp[30188]: (#3) No such process RBSStateCapture remove item called for untracked item 378-345-52811 (target:[app<application.com.myapp.15235459.15235465(501)>:30188])
在Xcode中以调试模式和发布模式运行应用时,除了Sparkle的以下警告外无其他提示(我认为与当前问题无关,仅作补充):
Warning: Background app automatically schedules for update checks but does not implement gentle reminders. As a result, users may not take notice to update alerts that show up in the background. Please visit https://sparkle-project.org/documentation/gentle-reminders for more information. This warning will only be logged once.
我将应用二进制包发给朋友后,其Console应用出现以下报错,但我无法复现该情况:
Sandbox: myapp(9044) deny(1) file-read-data /Users/user/Downloads/myapp.app IDENTITY_ATTRIBUTION: Failed to copy signing info for 9044, responsible for /private/var/folders/nt/40hq8tkx0tgb7c4fw5_n79wr0000gn/T/AppTranslocation/345F7E81-EE9E-4ADF-A66F-589A6647291D/d/myapp.app/Contents/MacOS/myapp: #-67065: Error Domain=NSOSStatusErrorDomain Code=-67065 "(null)"
已尝试的修复方法(均无效)
- 清理Xcode
- 删除Xcode Derived Data
- 重启Mac
- 使用替代Bundle Identifier构建应用
- 移除Sparkle包后重新归档、公证应用
- 在Xcode项目>Target>Signing中启用App Sandbox
- 在应用授权文件中添加
com.apple.security.automation.apple-events - 用新生成的证书替换钥匙串中的“Developer ID Application Certificate”
- 使用Xcode手动签名替代自动签名(创建开发、发布配置文件及App ID)
补充信息
- Xcode 15.2
- macOS Sonoma 14.5
- Xcode最低部署版本:13.0
依赖包
- LaunchAtLogin(main分支)
- RNCryptor(5.1.0)
- Sparkle(2.6.3)
内容的提问来源于stack exchange,提问作者N.K.
相关产品推荐
相关产品推荐

