RepoPilotOpen in app →

okmr-d/DOFavoriteButton

Cute Animated Button written in Swift.

Mixed

Stale — last commit 4y ago

worst of 4 axes
Use as dependencyMixed

last commit was 4y ago; no tests detected…

Fork & modifyMixed

no tests detected; no CI workflows detected…

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isMixed

last commit was 4y ago; no CI workflows detected

  • 12 active contributors
  • MIT licensed
  • Stale — last commit 4y ago
Show 3 more →
  • Concentrated ownership — top contributor handles 65% of recent commits
  • No CI workflows detected
  • No test directory detected
What would change the summary?
  • Use as dependency MixedHealthy if: 1 commit in the last 365 days; add a test suite
  • Fork & modify MixedHealthy if: add a test suite
  • Deploy as-is MixedHealthy if: 1 commit in the last 180 days

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Great to learn from" badge

Paste into your README — live-updates from the latest cached analysis.

RepoPilot: Great to learn from
[![RepoPilot: Great to learn from](https://repopilot.app/api/badge/okmr-d/dofavoritebutton?axis=learn)](https://repopilot.app/r/okmr-d/dofavoritebutton)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/okmr-d/dofavoritebutton on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: okmr-d/DOFavoriteButton

Generated by RepoPilot · 2026-05-10 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/okmr-d/DOFavoriteButton shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Stale — last commit 4y ago

  • 12 active contributors
  • MIT licensed
  • ⚠ Stale — last commit 4y ago
  • ⚠ Concentrated ownership — top contributor handles 65% of recent commits
  • ⚠ No CI workflows detected
  • ⚠ No test directory detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live okmr-d/DOFavoriteButton repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/okmr-d/DOFavoriteButton.

What it runs against: a local clone of okmr-d/DOFavoriteButton — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in okmr-d/DOFavoriteButton | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | Last commit ≤ 1457 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>okmr-d/DOFavoriteButton</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of okmr-d/DOFavoriteButton. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/okmr-d/DOFavoriteButton.git
#   cd DOFavoriteButton
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of okmr-d/DOFavoriteButton and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "okmr-d/DOFavoriteButton(\\.git)?\\b" \\
  && ok "origin remote is okmr-d/DOFavoriteButton" \\
  || miss "origin remote is not okmr-d/DOFavoriteButton (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 1457 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~1427d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/okmr-d/DOFavoriteButton"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

DOFavoriteButton is a Swift UIButton subclass that renders an animated favorite/like button with smooth morphing animations inspired by Twitter's iOS app. When tapped, it animates a flat icon image from grayscale to color while displaying expanding circles and animated lines, creating a delightful visual feedback for toggle actions. Simple two-layer structure: DOFavoriteButton/ contains the core library (DOFavoriteButton.swift plus bundled image assets: heart.png, like.png, smile.png, star.png), and DOFavoriteButton-DEMO/ is a standalone Xcode project demonstrating usage with ViewController.swift showing button instantiation and tap handlers.

👥Who it's for

iOS app developers building social features (favorites, likes, bookmarks) who want a polished, Twitter-style animated button without building custom CAAnimation layers. Typically used by developers targeting iOS 7.0+ who prefer CocoaPods/Carthage-managed dependencies over rolling their own.

🌱Maturity & risk

This is a stable, single-feature library with minimal maintenance. The codebase is small (~21KB Swift), supports iOS 7.0+ and Swift 1.2, and is available via CocoaPods and Carthage. However, the repo shows no recent commits visible in the data and appears to be in maintenance mode rather than active development—suitable for production use of the specific feature, but not under active feature development.

Low risk: it's a self-contained, single-file library (DOFavoriteButton/DOFavoriteButton.swift) with zero external dependencies. Main risk is age and single-maintainer status—no indication of test coverage, CI/CD pipeline, or activity level makes it potentially unmaintained. Swift 1.2 requirement suggests this may not build against modern Xcode versions without migration.

Active areas of work

No active development visible. The repository appears static with no indication of pending PRs, recent commits, or open milestones in the provided data. It functions as a maintained reference implementation rather than an actively evolved library.

🚀Get running

Clone the repo and open the demo: git clone https://github.com/okmr-d/DOFavoriteButton.git && cd DOFavoriteButton/DOFavoriteButton-DEMO && open DOFavoriteButton-DEMO.xcodeproj. Build and run on an iOS 7.0+ simulator or device using Xcode. To integrate into your own project: add pod 'DOFavoriteButton' to your Podfile, or manually copy DOFavoriteButton/DOFavoriteButton.swift into your Xcode project.

Daily commands: Open DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj in Xcode, select a simulator or device target, and press Cmd+R to build and run. The demo app displays four DOFavoriteButton instances (heart, like, smile, star) on ViewController that respond to taps with select()/deselect() animations.

🗺️Map of the codebase

  • DOFavoriteButton/DOFavoriteButton.swift: Core library: contains the UIButton subclass definition, animation logic in select()/deselect() methods, and all color/duration customization properties
  • DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift: Demonstrates practical usage: instantiates buttons, wires up tap handlers with addTarget(), and shows select()/deselect() toggle pattern
  • DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj: Xcode project configuration: declares build targets, asset references, and deployment settings for iOS 7.0+
  • [DOFavoriteButton/heart.png, like.png, smile.png, star.png](https://github.com/okmr-d/DOFavoriteButton/blob/master/DOFavoriteButton/heart.png, like.png, smile.png, star.png): Bundled flat icon assets that serve as templates for animation—must be flat, single-color images to animate properly
  • DOFavoriteButton.podspec: CocoaPods package manifest: defines version, source, platform requirements (iOS 7.0+), and Swift version constraints for distribution

🛠️How to make changes

To extend the button's animation behavior, edit DOFavoriteButton/DOFavoriteButton.swift—this is the only production file. The select() and deselect() methods contain the CABasicAnimation calls that drive the morphing effect. To test changes, modify DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift's tapped(_:) handler or add new instances with different images from DOFavoriteButton-DEMO/Images.xcassets/.

🪤Traps & gotchas

Swift 1.2 requirement may cause compilation failures with modern Xcode (13+)—no Xcode version constraint visible. The library requires flat, single-color PNG images; multi-layer or non-square images will not animate as expected. No explicit documentation on image dimensions or DPI, though the demo uses 44×44pt assets. Manual installation requires copying only DOFavoriteButton.swift, not the .podspec or Objective-C header.

💡Concepts to learn

  • Core Animation CABasicAnimation & CAKeyframeAnimation — DOFavoriteButton's entire visual effect depends on CABasicAnimation for color morphing and CAKeyframeAnimation for circle expansion—understanding timing curves and layer state is essential to modify animations
  • UIButton subclassing and event handling — DOFavoriteButton extends UIButton and overrides touch state management—learners must understand UIControl's -addTarget:action:forControlEvents: pattern to wire button taps correctly
  • CAShapeLayer for custom drawing — The expanding circle and animated line effects are drawn via CAShapeLayer paths added during animation—modifying visual effects requires familiarity with CGPath construction
  • Image tinting and color blending in Core Graphics — The flat icon morphs from imageColorOff to imageColorOn by manipulating pixel blending modes—understanding CGImage rendering modes is needed to extend color animation behavior
  • CocoaPods podspec and dependency distribution — DOFavoriteButton is distributed via CocoaPods; the .podspec file defines version, platform, and build settings—contributors should understand how podspec metadata controls installation
  • facebook/Shimmer — Similar elegant animation library for iOS; provides light-weight shimmer effects via Core Animation, comparable design philosophy of wrapping CAAnimations in reusable components
  • codeforamerica/Hearthis — Another social-feature button library with focus on heart animations—direct thematic counterpart for like/favorite UX patterns
  • twitter/twitter-ios-open-source — Twitter's official iOS app open source—the stated inspiration for DOFavoriteButton's animation design; reference implementation of professional-grade like button UX
  • TransformKit/Shimmer — Shimmer-style animation helpers in Swift; shares Core Animation patterns and property-based customization model

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add Swift Package Manager support with Package.swift

The repo currently supports CocoaPods and Carthage but lacks Swift Package Manager (SPM) support, which is now the preferred dependency manager for Swift projects. This would make the library accessible to modern Swift projects and align with current best practices.

  • [ ] Create Package.swift at the root directory defining the library target pointing to DOFavoriteButton/DOFavoriteButton.swift
  • [ ] Include the image assets (heart.png, like.png, smile.png, star.png) in the package resources section
  • [ ] Update README.md with SPM installation instructions
  • [ ] Test the package with swift build locally

Add unit tests for DOFavoriteButton.swift animation and state management

The main library file DOFavoriteButton/DOFavoriteButton.swift has no corresponding test coverage. Tests would ensure the animation behavior, state transitions, and button interactions work correctly across updates and prevent regressions.

  • [ ] Create Tests/ directory with DOFavoriteButtonTests.swift
  • [ ] Add tests for button initialization and configuration properties
  • [ ] Add tests for favorite state toggling and callback behavior
  • [ ] Add tests for animation timing and completion
  • [ ] Update the demo project's test target to include these tests

Update Swift version requirement and add GitHub Actions CI workflow

The README specifies Swift 1.2 (from ~2014), which is severely outdated. The repo needs a CI workflow to verify builds against modern Swift versions and ensure compatibility. This will help maintainers catch breaking changes and validate contributions.

  • [ ] Create .github/workflows/swift.yml with matrix builds for iOS 13+ and Swift 5.5+
  • [ ] Update README.md to reflect current minimum Swift version (5.5+) and iOS minimum version (13.0+)
  • [ ] Update DOFavoriteButton.podspec with current Swift and iOS version requirements
  • [ ] Test the workflow by pushing to a branch and verifying GitHub Actions runs successfully

🌿Good first issues

  • Add unit tests for select()/deselect() methods in DOFavoriteButton.swift to verify animation state changes and color property application—currently no test suite visible in the repo
  • Migrate Swift 1.2 syntax to modern Swift (5.0+) and update DOFavoriteButton.podspec's s.swift_versions—would unblock compilation on Xcode 13+

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 43c6525 — Merge pull request #30 from AurelTyson/swift3.0 (okmr-d)
  • 830d2cc — Updated project for Swift 3 (AurelTyson)
  • a770458 — Merge pull request #24 from alexruperez/master (okmr-d)
  • a2c07fe — Fix #14 Ready for Swift 2.2 (alexruperez)
  • 8db1f4d — Merge pull request #10 from eugenpirogoff/master (okmr-d)
  • db0425e — Merge pull request #21 from life360/master (okmr-d)
  • 91f9572 — Introduces the ability to select the button with an animated flag (JakeSc)
  • 91ed1c9 — Button now uses the provided image's frame for layer sizes (JakeSc)
  • 6ce3bc5 — Merge pull request #15 from palcalde/master (okmr-d)
  • 780015b — Merge pull request #12 from kylebshr/swift-2.0 (okmr-d)

🔒Security observations

This is a simple UI component library with minimal security risk due to its limited scope and lack of external dependencies. However, the primary concern is the significantly outdated Swift and iOS version requirements (Swift 1.2, iOS 7.0+). The codebase appears to be a pure animation library without network calls, database interactions, or user input handling, reducing injection and data exfiltration risks. The main recommendation is to modernize the minimum supported versions to receive security updates and patches. Consider adding responsible disclosure documentation to improve the security posture further.

  • Medium · Outdated Swift and iOS Version Requirements — README.md, DOFavoriteButton.podspec. The project specifies Swift 1.2 and iOS 7.0+ as requirements, which are extremely outdated (released in 2015). Modern security patches, vulnerability fixes, and deprecated API removals are not addressed. This creates potential security risks from known vulnerabilities in older Swift runtime and iOS frameworks. Fix: Update minimum iOS deployment target to at least iOS 12.0 or higher, and ensure Swift version is updated to Swift 5.0+. Review and test all APIs for deprecated or insecure methods.
  • Low · Missing Security Policy Documentation — Repository root. No SECURITY.md or security policy file is present in the repository. This makes it difficult for security researchers to responsibly disclose vulnerabilities. Fix: Create a SECURITY.md file with responsible disclosure guidelines and contact information for reporting security issues.
  • Low · No Code Signing Configuration Visible — DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj. The Xcode project files don't explicitly show code signing configurations in the provided structure. While this is not necessarily a vulnerability, proper code signing is essential for iOS security. Fix: Ensure proper code signing identities are configured in Xcode project settings and use automatic signing with valid provisioning profiles.
  • Low · No Dependency Verification — DOFavoriteButton.podspec. As a library component with no external dependencies listed, there's minimal risk. However, no lock files or version pinning mechanism is visible for package management. Fix: Consider using CocoaPods' Podfile.lock or Carthage's Cartfile.resolved to ensure reproducible builds and prevent dependency drift.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · okmr-d/DOFavoriteButton — RepoPilot