sindresorhus / LaunchAtLogin-Legacy

Add “Launch at Login” functionality to your macOS app in seconds
MIT License
1.55k stars 122 forks source link

Gatekeeper assessment damaged with Carthage + Cocoapods #37

Closed mribeiro closed 3 years ago

mribeiro commented 4 years ago

I think this is more of a request for help than anything else. If someone has the time I'd appreciate that. So basically I have this dependency with Carthage and everything else is in Cocoapods. I followed Carthage's guide: adding their build phase, setup Cartfile, etc. Then I followed LaunchAtLogin's and also added a build phase to copy the helper.

The problem is when I archive and export the app as copy (no signing) and try to validate the .app with RB App Checker Lite it points out the following:

Gatekeeper assessment: FAIL (damaged).  
    ➤ Requirements and resources didn't pass static validation.  

And this prevents the app from being opened saying the app is damaged and it should be deleted being the only two options to cancel or move to trash. Looking for more info one why is damaged:

raw assessment: {
    damaged = "/Users/aribeiro/Desktop/Timetracker 2020-04-15 08-12-41/Timetracker.app/: a sealed resource is missing or invalid";
}

And the details:

Error details: “-67054: a sealed resource is missing or invalid” {
    Resources missing: 
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Info.plist
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreFoundation.dylib
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDispatch.dylib
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/copy-helper.sh
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftIOKit.dylib
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/PkgInfo
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDarwin.dylib
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftFoundation.dylib
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreGraphics.dylib
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftObjectiveC.dylib
        Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCore.dylib
    Error in subcomponent: Contents/Frameworks/LaunchAtLogin.framework
}

So it seems like, to me, that the .app is being generated and only after it is being changed to include LaunchAtLogin assets because all the resources missing are in the .app file. If I remove this dependency (the only one I have in Carthage) it RB just complains about being an unknown developer — which is OK because I didn't pay Apple the subscription.

sindresorhus commented 3 years ago

I, unfortunately, cannot help with this. Many of these issues are super obscure. However, I recommend trying out the latest version which supports SPM, which should have fewer problems: https://github.com/sindresorhus/LaunchAtLogin/releases/tag/v4.0.0