This document describes how to create and publish a new release of Spotifly.
- Xcode installed and working
- Apple Developer account (paid, $99/year) configured in Xcode
- GitHub CLI (
gh) installed and authenticated - Write access to the
ralph/homebrew-spotiflyrepository
In Xcode:
- Open the project in Xcode
- Select the Spotifly project in the navigator
- Select the Spotifly target
- Go to the General tab
- Update the Version field (e.g.,
1.0,1.1,2.0) - The Build number can stay the same or be incremented
Make sure all your changes are committed to git:
git status
git add -A
git commit -m "Prepare for v1.0 release"./release.shThe script will guide you through the entire process with interactive prompts.
The script will pause at each step and provide clear instructions:
- In Xcode, go to Product → Archive
- Wait for the archive to complete
- Keep the Organizer window open
- In the Organizer, click Validate App
- Choose Developer ID
- Wait for validation to complete
- Ensure validation passes
- Click Distribute App
- Choose Developer ID
- Choose Upload (sends to Apple for notarization)
- Wait 2-5 minutes for notarization to complete
- Click Distribute App again
- Choose Developer ID
- Choose Export (NOT Upload this time)
- Export to
~/Desktop/Spotifly-Export
After you export the notarized app, the script automatically:
- Verifies the app is properly signed and notarized
- Creates a ZIP file
- Uploads to GitHub Releases in the
ralph/homebrew-spotiflyrepository - Tags as both
v{VERSION}andlatest - Updates the Homebrew Cask formula with the new version and SHA256
- Commits and pushes the formula changes
The release is complete and published. Users can install immediately:
brew upgrade ralph/spotifly/spotiflyOr for new installations:
brew install ralph/spotifly/spotifly- Archived app: Optimized for Release (Product → Archive uses Release configuration)
- Code signing: Signed with Developer ID Application certificate
- Notarization: Notarized by Apple (no Gatekeeper warnings!)
- Optimizations: Full compiler optimizations enabled
- Architecture: arm64 only (Apple Silicon)
- ZIP file: Contains notarized
Spotifly.appbundle - Location:
ralph/homebrew-spotiflyreleases (NOT the source code repo)
If you need to replace an existing release (e.g., to fix signing issues):
- Run
./release.shas normal - When prompted that the release already exists, type
yto replace it - The script will delete the old release and create a new one with the same version
The Homebrew formula is automatically updated by the release script. You can verify the release:
brew upgrade ralph/spotifly/spotiflyOr for new installations:
brew install ralph/spotifly/spotifly"Release v1.0 already exists"
- The script will ask if you want to replace it
- Type
yto replace, ornto abort and update the version number
Validation failed: "LSApplicationCategoryType"
- This is already configured in the project (set to
public.app-category.music) - If you see this error, the Xcode project may need to be updated
Notarization takes too long
- Notarization usually takes 2-5 minutes
- You can check status at https://developer.apple.com/account
- If it fails, check the email associated with your Apple Developer account for details
"Exported app not found"
- Make sure you exported to
~/Desktop/Spotifly-Export - The script looks for
Spotifly.appin this exact location
Verification failed
- The script verifies the app is properly notarized using
spctl - If verification fails, you can choose to continue anyway
- Check that your Developer ID certificate is valid in Xcode preferences
The Release configuration includes:
- Optimization Level:
-O(Optimize for Speed) - Whole Module Optimization: Enabled
- Architecture: arm64 only (Apple Silicon)
- Code Signing: Automatic with Developer ID
- Hardened Runtime: Enabled
- App Sandbox: Enabled
The app is:
- Signed with your Developer ID Application certificate
- Notarized by Apple's notary service
- Verified with
spctlbefore upload
This ensures users don't see Gatekeeper warnings when opening the app.
Nothing needs building before the Archive. The app is Swift throughout, plus the vendored libogg and libvorbis sources that Xcode compiles with the rest of the target.
- The release script expects the homebrew-spotifly repository at
~/code/spotifly/homebrew-spotifly - Exported apps are saved to
~/Desktop/Spotifly-Exportand cleaned up after upload - Both the source repo and homebrew-spotifly repo must have clean working directories