gpt4 book ai didi

macos - 当我的应用显示 : Application is damaged and can't be opened. 时发生了什么 您应该将其移至废纸篓

转载 作者:行者123 更新时间:2023-12-01 15:17:17 25 4
gpt4 key购买 nike

我写了一个应用程序,在我的机器上编译和签名。它适用于我团队中的其他开发人员,但对于两个不同的人,一个使用 OS X Mavericks,一个使用 Yosemite,它会显示以下消息:

enter image description here

我能够在全新的 Yosemite 安装上重现该错误。发生这种情况时,这就是我在日志中看到的内容:

30/03/2015 22:43:26.266 SpotlightNetHelper[256]: [SLSUGGESTIONS] Location managed failed with error Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
30/03/2015 22:43:27.250 CoreServicesUIAgent[263]: Error -60005 creating authorization
30/03/2015 22:43:27.357 CoreServicesUIAgent[263]: Error SecAssessmentCreate: The operation couldn’t be completed. (OSStatus error -67054.)
30/03/2015 22:43:31.687 com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.oneshot.0x10000006.Screensaver Ninja[434]) Service exited due to signal: Killed: 9

环顾四周似乎签名可能是个问题,但我可以验证它是否成功(我认为):

$ codesign -dvvv --deep /Applications/Screensaver\ Ninja.app
Executable=/Applications/Screensaver Ninja.app/Contents/MacOS/Screensaver Ninja
Identifier=com.carouselapps.Screensaver-Ninja
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=3338 flags=0x0(none) hashes=159+3 location=embedded
Hash type=sha1 size=20
CDHash=c6c5fc1072a7e495969c3223f0950ceb53e246a7
Signature size=8533
Authority=Developer ID Application: Carousel Apps Ltd (XHT4M2DATL)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=30 Mar 2015 18:29:31
Info.plist entries=23
TeamIdentifier=XHT4M2DATL
Sealed Resources version=2 rules=12 files=35
Nested=Frameworks/libswiftObjectiveC.dylib
Nested=Frameworks/Sparkle.framework
Nested=Frameworks/Paddle.framework
Nested=Frameworks/HockeySDK.framework
Nested=Frameworks/libswiftCore.dylib
Nested=Frameworks/libswiftDispatch.dylib
Nested=Frameworks/libswiftFoundation.dylib
Nested=Frameworks/libswiftCoreGraphics.dylib
Nested=Frameworks/libswiftSecurity.dylib
Nested=Frameworks/libswiftDarwin.dylib
Nested=Frameworks/libswiftQuartzCore.dylib
Nested=Frameworks/libswiftAppKit.dylib
Internal requirements count=2 size=896

任何想法可能会发生什么?

可以在 https://s3.amazonaws.com/screensaver-ninja/macosx/ScreensaverNinja-1.0-alpha-1.dmg 上找到该应用程序

最佳答案

问题是由于这个选项:RemoveHeadersOnCopy,框架被它们的 header 被删除而被破坏。

从我的框架中删除该选项后,这个错误就消失了。这有助于:

$ codesign -dvvv --deep --verify /Applications/Screensaver\ Ninja.app
--prepared:/Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/.
--prepared:/Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/.
/Applications/Screensaver Ninja.app: a sealed resource is missing or invalid
In subcomponent: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/CrashReporter.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportSignalInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportMachineInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportBinaryImageInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportExceptionInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportMachExceptionInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReport.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportSymbolInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportSystemInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReporter.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashNamespace.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportProcessorInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportProcessInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportTextFormatter.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReporterConfig.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportRegisterInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportStackFrameInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportThreadInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportFormatter.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashReportApplicationInfo.h
file missing: /Applications/Screensaver Ninja.app/Contents/Frameworks/HockeySDK.framework/Versions/Current/Frameworks/CrashReporter.framework/Versions/Current/Headers/PLCrashFeatureConfig.h

我还需要按照 https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/DistributingApplicationsOutside/DistributingApplicationsOutside.html 中解释的步骤进行操作拥有正确签名的 .app 文件。

关于macos - 当我的应用显示 : Application is damaged and can't be opened. 时发生了什么 您应该将其移至废纸篓,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29357027/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com