-
Notifications
You must be signed in to change notification settings - Fork 0
Remove Sparkle dependency and update app launch process #5
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @jsonify, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly refactors the application by eliminating the Sparkle auto-update framework and all its associated code and UI components. Concurrently, it enhances the app's launch process to be more robust by introducing a fallback mechanism and integrates ad-hoc code signing into the build scripts to prevent common launch failures in development environments.
Highlights
- Dependency Removal: The Sparkle framework, previously used for app updates, has been completely removed from the project, including its package dependency, core update manager, and appcast generation logic.
- UI Cleanup: All user interface components related to the Sparkle-based update mechanism, such as the
DeveloperUpdateButtonandUpdateNotificationCard, have been removed, simplifying the UI. - App Launch Robustness: The app launch script (
run_clickit_unified.sh) has been enhanced to include a fallback mechanism. If the initialopencommand fails, it now attempts to launch the executable directly, improving resilience. - Build Process Improvement: Fastlane build lanes (
build_debug,build_release) now include logic to automatically apply an ad-hoc code signature if the application is not already signed, which can prevent launch issues during local development. - Configuration Simplification: All update-related constants and configurations within
AppConstants.swifthave been removed, streamlining the project's configuration.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request removes the Sparkle dependency and streamlines the app launch process. The changes are clean and well-structured. I've provided feedback on Fastfile and run_clickit_unified.sh to improve maintainability by reducing code duplication and eliminating hardcoded values.
| sh("./build_app_unified.sh release spm") | ||
|
|
||
| # Apply adhoc signature if no certificate was found | ||
| app_path = "dist/ClickIt.app" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line hardcodes the application name. To improve maintainability, use the APP_NAME variable defined at the top of this file. The ad-hoc signing block is duplicated from the build_debug lane; consider extracting this logic into a private lane to avoid redundancy.
app_path = "dist/#{APP_NAME}.app"
| if open "dist/ClickIt.app" 2>/dev/null; then | ||
| echo "✅ ClickIt launched successfully!" | ||
| echo "🔧 The app should appear in your Dock and System Settings > Accessibility" | ||
| else | ||
| echo "⚠️ App bundle launch failed - trying direct executable..." | ||
| if [ -f "dist/ClickIt.app/Contents/MacOS/ClickIt" ]; then | ||
| echo "🚀 Launching executable directly..." | ||
| "./dist/ClickIt.app/Contents/MacOS/ClickIt" & | ||
| echo "✅ ClickIt launched via direct executable!" | ||
| echo "🔧 The app should appear in your Dock and System Settings > Accessibility" | ||
| else | ||
| echo "❌ Could not launch ClickIt" | ||
| echo "💡 Try: codesign --force --deep --sign - dist/ClickIt.app" | ||
| exit 1 | ||
| fi | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The application name ClickIt is hardcoded in several places. The script already defines an APP_NAME variable which should be used instead. The echo command to print instructions about Accessibility settings is duplicated in both the if and else branches. It can be moved outside the conditional block to reduce redundancy.
| if open "dist/ClickIt.app" 2>/dev/null; then | |
| echo "✅ ClickIt launched successfully!" | |
| echo "🔧 The app should appear in your Dock and System Settings > Accessibility" | |
| else | |
| echo "⚠️ App bundle launch failed - trying direct executable..." | |
| if [ -f "dist/ClickIt.app/Contents/MacOS/ClickIt" ]; then | |
| echo "🚀 Launching executable directly..." | |
| "./dist/ClickIt.app/Contents/MacOS/ClickIt" & | |
| echo "✅ ClickIt launched via direct executable!" | |
| echo "🔧 The app should appear in your Dock and System Settings > Accessibility" | |
| else | |
| echo "❌ Could not launch ClickIt" | |
| echo "💡 Try: codesign --force --deep --sign - dist/ClickIt.app" | |
| exit 1 | |
| fi | |
| fi | |
| if open "dist/${APP_NAME}.app" 2>/dev/null; then | |
| echo "✅ ClickIt launched successfully!" | |
| else | |
| echo "⚠️ App bundle launch failed - trying direct executable..." | |
| local executable_path="dist/${APP_NAME}.app/Contents/MacOS/${APP_NAME}" | |
| if [ -f "${executable_path}" ]; then | |
| echo "🚀 Launching executable directly..." | |
| "${executable_path}" & | |
| echo "✅ ClickIt launched via direct executable!" | |
| else | |
| echo "❌ Could not launch ClickIt" | |
| echo "💡 Try: codesign --force --deep --sign - \"dist/${APP_NAME}.app\"" | |
| exit 1 | |
| fi | |
| fi | |
| echo "🔧 The app should appear in your Dock and System Settings > Accessibility" |
Eliminate the Sparkle dependency and streamline the app launch process to handle failures more gracefully. Remove outdated update configurations and related UI components.