-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insecure update error warning when running tests, as tests are never code signed #680
Comments
In the Info.plist setting Alternatively you can set |
Same issue here, during tests the modal still shows up and hangs my tests. I tried changing the plist values and returning What is the recommended setup for apps that have unit tests? |
- keychain keeps different keys for release and debug (we were getting a dialog bc release was codesigned and debug wasn't)
It looks like Apple's solution for this, via Xcode's automatic code signing, is to sign everything, even for tests. |
I really don't buy that; in fact I think there's a recent trend to not set up signing info at all. I think if DSA signing was used, Sparkle wouldn't prompt up a dialog here. |
Is there any update on this issue? I just took over maintenance of an internal macOS app and I'm trying to add tests but getting this same error. I'm running the tests with this syntax:
I can make them pass locally by using I tried @kornelski suggestion by passing Thanks for your help 🙏 |
Inspired by the commit @czechboy0 linked, I worked around the issue like this: // There are instances in which we might not want to run Sparkle, for example when running
// the tests via xcodebuild in CI due to a blocking alert related to code signing.
// In such cases, one can pass the `SKIP_SPARKLE` preprocessor definition and not have Sparkle
// launched.
//
// Using a "skip" flag plus an "if not defined" means that there are no changes to the setup for
// debug and release builds; only those who wish to no have Sparkle need to do extra work.
//
// See https://github.com/sparkle-project/Sparkle/issues/680
#ifndef SKIP_SPARKLE
self.updater = [SUUpdater sharedUpdater];
#endif And updated my
This works alright for me 👌 |
I'm having a problem with linking Sparkle and running UI/Unit tests from a unsigned unit-test target. Sparkle shows a popup about "Insecure Update" when executing the tests from command line, which blocks the test executing completely.
Is there any flags or settings that would prevent Sparkle from attempting to update when running a test (or maybe even DEBUG) target? I've tried disable auto updating in the Info.plist without any luck
The text was updated successfully, but these errors were encountered: