HeroTransitions/Hero
46.0
Weak · 27 September 2026
7.6k
lines of production code
Swift
primary language
4
measurements over time
What this system is
This release delivers a comprehensive architectural overhaul of the Hero animation engine, introducing a new context-based system that separates Core Animation, view property, and base contexts to improve stability and extensibility. The library's internal structure is significantly refactored with new preprocessors, modifiers, and a dedicated parser, while the legacy UIKit-based animation engine is removed. Alongside these core changes, the project undergoes a major infrastructure update with new Makefile tooling, CI/CD configuration, and documentation. The example applications are reorganized and updated to Swift 4.2, with several legacy examples and dependencies removed to streamline the codebase.
Features
Add Makefile-based build and development tooling
The project introduces a suite of Makefile targets to streamline development workflows. This includes automated setup for iOS dependencies (Ruby, Homebrew, Carthage, SwiftLint), Docker Compose management (build, up, down, clean), Python virtual environment creation and dependency installation, and a generic help system that parses Makefile comments to display available targets. These changes provide a unified interface for common tasks like building, testing, and cleaning artifacts across different environments.
.makefiles · high confidence
Add new animation examples and base view controller
The Examples directory now includes several new demo files: AppStoreCardExample.swift, BuiltInTransitionExample.swift, MatchExample.swift, MatchInCollectionExample.swift, and SwiftUIMatchExample.swift, which demonstrate advanced transition techniques, built-in animation types, and SwiftUI integration. A shared ExampleBaseViewController.swift provides a common base for these examples, featuring a back button and tap gesture handling. The MainViewController.swift has been updated to list and launch these new examples, including a conditional insertion of the SwiftUI match example for iOS 13+.
Examples · high confidence
Added Xcode scheme files for iOS, tvOS, and example app
The project now includes explicit Xcode scheme definitions for the main iOS and tvOS targets, as well as the example application. These new .xcscheme files in the xcshareddata directory configure build, test, launch, profile, and archive actions for each target, ensuring consistent development workflows within Xcode.
Hero.xcodeproj/xcshareddata · high confidence
Added new demo examples for basic animations and Apple product pages
The LegacyExamples area now includes new storyboard and view controller files that demonstrate basic Hero animation patterns, such as color and label transitions, as well as a swipeable Apple product showcase (iPhone, Watch, MacBook) with custom pan-gesture-driven transitions.
LegacyExamples · high confidence
Introduce new parser components for expression handling
Added new files in the Sources/Parser directory to support parsing and tokenizing expressions. This includes a Lexer for tokenizing input, a Parser for building an expression tree, and node classes representing different expression types (e.g., number, variable, binary operation, call, prototype, and function nodes). A protocol HeroStringConvertible and extension on String provide a convenient API to parse strings into these nodes. This change adds new structural components for parsing rather than modifying existing behavior.
Sources/Parser · high confidence
Removals
Removal of legacy UIKit-based Hero animation engine
The legacy \Hero\ animation engine and its associated UIKit extensions have been removed from the \Hero\ directory. This includes the deletion of \Hero.swift\, \HeroContext.swift\, \HeroDebugPlugin.swift\, \HeroDefaultAnimator.swift\, \HeroTypes.swift\, \SourceIDPreprocessor.swift\, \UIKit+Hero.swift\, and \UIKit+HeroModifier.swift\. This change eliminates the previous implementation of view controller transition animations and modifier handling, likely as part of a larger refactoring to a new animation architecture.
Hero · high confidence
Removed DebugViewController example
The DebugViewController example file has been removed from the codebase. This eliminates the UI component that previously allowed users to toggle the Hero debug plugin via a switch, simplifying the example project by removing this specific debugging interface.
Examples/HeroExamples/Examples/Debug · high confidence
Removed LabelTransform example
The LabelTransform example, which demonstrated a custom HeroPlugin for animating UILabel morphing, has been removed from the codebase.
Examples/HeroExamples/Examples/ImageGallery, Examples/HeroExamples/Examples/LabelTransform · high confidence
Removed example project and helper utilities
The HeroExamples project file and the CG+HeroExamples.swift utility file have been removed from the repository. This eliminates the example application and its associated helper extensions, likely as part of a broader cleanup to streamline the project structure.
Examples/HeroExamples.xcodeproj · high confidence
Architecture
Restructured preprocessor architecture with new conditional and default animation support
The preprocessor logic has been reorganized into a modular, extensible hierarchy with a new \BasePreprocessor\ base class. This change introduces \ConditionalPreprocessor\ to support conditional view modifiers, \DefaultAnimationPreprocessor\ to define standard animation types and directions, and \SourcePreprocessor\ to handle view source/target state preparation. The existing \CascadePreprocessor\ has been refactored to use the new base class and now supports radial and inverse-radial cascade directions, while \IgnoreSubviewModifiersPreprocessor\ and \MatchPreprocessor\ have been added to handle recursive modifier cleaning and view matching states respectively.
Sources/Preprocessors · high confidence
Behavioural changes
Demo app reorganized and updated to Swift 4.2
The demo application's source files have been reorganized into a new 'Examples/Resources' directory, with the main entry point (AppDelegate) and utility extensions moved there. The Info.plist has been updated to use a dynamic marketing version string and explicitly support landscape orientations. Additionally, the code has been updated to support Swift 4.2, including the addition of a compatibility shim for CMTime APIs on older Swift versions.
Examples/Resources · medium confidence
Project infrastructure and documentation overhaul
The repository has been restructured with the addition of configuration files for CI/CD and code quality tools, including \.codecov.yml\ for coverage reporting, \.editorconfig\ for consistent coding styles, \.jazzy.yaml\ for API documentation generation, \.swiftlint.yml\ for Swift linting, and a \Dangerfile\ for automated pull request reviews. The \README.md\ and \README.zh-cn.md\ files have been significantly updated to reflect new installation methods (CocoaPods, Carthage, Accio), updated compatibility badges (iOS 10.0+, Swift 4.0+), and improved usage examples. Additionally, a \CHANGELOG.md\ was introduced to track version history, and the \.gitignore\ was updated to exclude build artifacts and generated files.
(repo-wide) · high confidence
Refactored and expanded the core transition logic
The \Sources/Transition\ directory has been reorganized into multiple specialized files (e.g., \HeroProgressRunner\, \HeroTransition+Animate\, \HeroTransition+Complete\) to improve code structure. This change introduces a new \HeroProgressRunner\ class to manage animation progress via \CADisplayLink\, adds a \changeTarget\ method to allow overriding modifiers during interactive transitions, and implements the \UITabBarControllerDelegate\ to handle tab bar interactions and prevent crashes when rapidly switching tabs.
Sources/Transition · high confidence
Refactored animation architecture with new context classes
The animation engine has been restructured by introducing three new internal classes: HeroAnimatorViewContext, HeroCoreAnimationViewContext, and HeroViewPropertyViewContext. This change separates the logic for handling different types of animations (Core Animation, View Property, and base context), which improves the handling of interactive transitions, fixes several crashes related to animation states, and supports new features like anchor point transitions and visual effect animations.
Sources/Animator · high confidence
Refactored geometry and utility extensions for improved type safety and performance
The library's internal helper extensions have been refactored to improve type safety and performance. Geometry operations on \CGPoint\ and \CGSize\ now use internal extension methods rather than global functions, and \CGAffineTransform\ and \CATransform3D\ support direct transformation of these types. \CALayer\ gains a \flatTransformTo\ method to correctly compute cumulative transforms across the layer hierarchy. Additionally, \NSCoding\ copy logic is updated to use the secure \unarchivedObject\ API on iOS 11+, addressing deprecation warnings and improving security. These changes streamline the internal API for view and view controller extensions.
Sources/Extensions · high confidence
Removed ChameleonFramework pod from the example project
The ChameleonFramework CocoaPod, along with all its associated Objective-C headers and implementations (including color utilities, UI appearance helpers, and macros), has been removed from the Examples/Pods directory. This eliminates the dependency on the Chameleon library for the example project.
Examples/Pods · high confidence
Removed CityGuideCell component from CityGuide example
The CityGuideCell.swift file, which defined the CityCell class for the CityGuide example, has been removed. This change eliminates the custom UICollectionViewCell implementation that previously handled city data binding and Hero animation IDs for the city guide list items.
Examples/HeroExamples/Examples/CityGuide · high confidence
Restructured Xcode project workspace and added IDE workspace checks
The Xcode project workspace has been restructured, moving the workspace configuration from the Examples directory to the main project folder. Additionally, a new IDE workspace checks file (IDEWorkspaceChecks.plist) was added to the project, which enables the 'IDEDidComputeMac32BitWarning' setting, likely to suppress or manage 32-bit architecture warnings in the build process.
Hero.xcodeproj/project.xcworkspace · medium confidence
Reworked internal architecture and exposed new animation modifiers
The library's internal structure has been significantly refactored to support more flexible animation control. A new \HeroContext\ class now manages the state of all animating views, replacing the previous \HeroPreprocessor\ and \HeroAnimator\ protocols with a more cohesive context object. This change introduces several new \HeroModifier\ options, including \beginWith\ to apply modifiers at the start of a transition, \useGlobalCoordinateSpace\ for independent view movement, and \useNoSnapshot\ to animate views directly without creating snapshots. Additionally, the \HeroPlugin\ API has been updated to use the new context-based methods, and a \HeroViewControllerDelegate\ protocol has been introduced to allow developers to hook into transition lifecycle events.
Sources · high confidence
Split Main.storyboard into multiple storyboards
The single Main.storyboard file in the example project has been split into multiple, smaller storyboards. This change improves the organization and maintainability of the example app's user interface definitions, making it easier to navigate and edit individual screens without editing a massive, monolithic file.
Examples/HeroExamples/Base.lproj · high confidence
TvOS example app restructured and updated for Swift 4.2
The TvOS example project has been reorganized into the TvOSExamples directory, with the main storyboard now defining a tab bar controller that links to the Basic, Image Gallery, and Image Viewer scenes. The Basic and Image Gallery storyboards have been updated to include Hero animation configurations (such as heroID and cornerRadius), and the Swift code has been migrated to Swift 4.2 syntax, including the use of UIApplication.LaunchOptionsKey and conditional compilation for Swift 4.2 compatibility.
TvOSExamples · high confidence
Updated LaunchScreen.storyboard for modern iOS layout guides
The LaunchScreen.storyboard has been migrated to use modern Safe Area layout guides, replacing the deprecated top and bottom layout guides. This change also updates the storyboard's Xcode tool version and includes a device definition for the iPhone 11/12/13 series (retina 6.1), ensuring the launch screen renders correctly on newer iOS versions and screen sizes.
Examples/Resources/Base.lproj · medium confidence
Updated Xcode project configuration for Hero 1.6.2
The Xcode project file (project.pbxproj) has been updated to version 1.6.2, incorporating build file references for various Swift source files, including preprocessors (Cascade, IgnoreSubviewModifiers, Match, Source, DefaultAnimation, Conditional), animation contexts (HeroCoreAnimationViewContext, HeroAnimatorViewContext, HeroViewPropertyViewContext), and transition components (HeroTransition, HeroDefaultAnimator). The project also includes references to example applications (HeroExamples, HeroTvOSExamples) and test targets, reflecting the structural changes in the codebase for this release.
Hero.xcodeproj · medium confidence
Workspace configuration and structure updated for Xcode 9.3 and Swift 4.1
The Xcode workspace has been restructured and updated to support Xcode 9.3 and Swift 4.1. This includes adding new workspace settings that disable Previews and set the build system to 'Latest', enabling the 32-bit warning flag, and moving the workspace configuration to a new 'Hero.xcworkspace' directory with an updated project reference from 'HeroExamples.xcodeproj' to 'Hero.xcodeproj'.
Hero.xcworkspace · medium confidence
Fixes
Debug plugin respects iPhone X safe area insets
The debug plugin now accounts for iPhone X safe area insets when positioning the debug view, ensuring the UI is not obscured by the device's status bar or home indicator. Additionally, the debug view now includes a button to display arc curves during animations, providing better visibility of transition paths.
Sources/Debug Plugin · high confidence
Test coverage
Added unit tests for the parser
Added a new test file, HeroTests.swift, containing unit tests for the parser's ability to handle various expression formats, including single arguments, multiple calls, nested structures, and error conditions. Additionally, the test bundle's Info.plist was moved to the Tests directory and updated to reflect the bundle type and version.
Tests · high confidence
Dependencies
Restructure project files and update CocoaPods configuration
The project's root-level configuration files (Gemfile, Podfile, Package.swift, etc.) have been moved or reorganized, and the old Hero.podspec has been removed. This change updates the development environment setup, including adding new Ruby gems for CI and linting, and aligning the CocoaPods and Swift Package Manager configurations with the new directory structure.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 33 → 46 (+12.8)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 48 → 89 (+40.8)
- Architecture 94 (new)
- Maturity 55 → 59 (+3.3)
- Readiness 14 → 67 (+52.9)
- Security 60 → 59 (-1.6)
- Accessibility 25 (new)
Resolved (16)
- Dimension evaluation failed
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- LLM evaluation failed
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- No automated tests
- No exposed public API
- No tests found
- Test reliability not included
New (97)
- Banned license: cocoapods-repo-update
- CascadePreprocessor.process (cognitive 16) (Sources/Preprocessors/CascadePreprocessor.swift)
- Coverage not measured — Swift suite
- Critical CVE: [GHSA redacted] (Gemfile.lock)
- Critical CVE: [GHSA redacted] (Gemfile.lock)
- DefaultAnimationPreprocessor.process (cognitive 33) (Sources/Preprocessors/DefaultAnimationPreprocessor.swift)
- DefaultAnimationPreprocessor.process (cyclomatic 36) (Sources/Preprocessors/DefaultAnimationPreprocessor.swift)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Dormant codebase
- Duplicate intent: Both HeroDebugPlugin and HeroPlugin expose an identical 'animate' method signature. Since HeroDebugPlugin is likely a subclass or implementation detail of the animation system, exposing the same public API surface on both creates redundancy and confusion about which instance to use.
- Duplicate intent: Both HeroDebugPlugin and HeroPlugin expose an identical 'clean' method signature. This redundancy implies that the debug plugin is duplicating core lifecycle management logic that should likely be inherited or delegated.
- Duplicate intent: Both HeroDebugPlugin and HeroPlugin expose an identical 'resume' method signature. This suggests a leaky abstraction where debug-specific control methods are exposed on the same level as the core plugin interface.
- Duplicate intent: Two methods with the same name 'beginWith' and identical parameter types ([HeroModifier]) but different label names (unnamed vs 'modifiers'). In Swift, this creates ambiguity or requires the caller to explicitly use the label, which is inconsistent with the rest of the API where labels are often omitted for single-argument convenience or consistently applied.
- Duplicated block (11 lines × 2) (Examples/AppStoreCardExample.swift)
- Duplicated block (5 lines × 3) (Sources/Preprocessors/DefaultAnimationPreprocessor.swift)
- Duplicated block (7 lines × 2) (Sources/Animator/HeroCoreAnimationViewContext.swift)
- HeroContext.snapshotView (cognitive 55) (Sources/HeroContext.swift)
- HeroContext.snapshotView (cyclomatic 42) (Sources/HeroContext.swift)
- HeroCoreAnimationViewContext.canAnimate (cognitive 16) (Sources/Animator/HeroCoreAnimationViewContext.swift)
- …and 77 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
HeroTransitions/Hero was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d7a72e13b034599ff694e6907f770e6bcb83f59d — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-d00c643c3f66.