# How YTLite Shows YouTube Dislike Counts: A Complete Technical Breakdown

> Discover how YTLite restores YouTube dislike counts by integrating the Return YouTube Dislikes API into the iOS app. Learn the technical details behind this feature.

- Repository: [Dan/YTLite](https://github.com/dayanch96/YTLite)
- Tags: deep-dive
- Published: 2026-04-22

---

**YTLite restores YouTube dislike counts by bundling the third-party "Return-YouTube-Dislikes" tweak, which fetches historic dislike data from a public API and injects it into the YouTube iOS app UI.**

YTLite is an iOS jailbreak tweak that enhances the YouTube app with additional features. One of its most requested capabilities is showing dislike counts, which YouTube removed from public view in 2021. Understanding how YTLite shows YouTube dislike counts requires examining its build-time integration strategy and runtime hooking architecture.

## The Core Architecture: External Tweak Bundling

Rather than implementing dislike-count logic from scratch, YTLite leverages a specialized component maintained by the community. This design decision separates concerns: the Return-YouTube-Dislikes project handles API communication and data parsing, while YTLite focuses on integration and user preferences.

### Build-Time Integration via CI Pipeline

The bundling happens during YTLite's continuous integration workflow. The GitHub Actions script in [`.github/workflows/_build_tweaks.yml`](https://github.com/dayanch96/YTLite/blob/main/.github/workflows/_build_tweaks.yml) automates this process:

```yaml

# .github/workflows/_build_tweaks.yml

- name: Clone Return-YouTube-Dislikes
  run: git clone --quiet --depth=1 https://github.com/PoomSmart/Return-YouTube-Dislikes.git
- name: Build Return-YouTube-Dislikes
  run: |
    cd Return-YouTube-Dislikes && make clean package DEBUG=0 FINALPACKAGE=1

```

This approach ensures every YTLite release contains a current, compiled version of the Return-YouTube-Dislikes tweak. The `--depth=1` flag minimizes clone time by fetching only the latest commit.

### How the Bundled Tweak Functions at Runtime

Once installed on a device, the compiled Return-YouTube-Dislikes code performs three critical operations:

1. **Method swizzling** — It intercepts YouTube's internal UI rendering methods through the Objective-C runtime.
2. **API communication** — It contacts the public Return-YouTube-Dislikes API endpoint to retrieve stored dislike data for the currently playing video.
3. **UI injection** — It inserts the retrieved count into the appropriate UI element, typically adjacent to or replacing the disabled dislike button.

This mechanism operates independently of YTLite's core code, though both tweaks coexist within the same process space.

## YTLite's UI Control Layer

While YTLite delegates dislike-count retrieval to its bundled dependency, it provides direct user control over how dislikes appear in one specific context: YouTube Shorts.

### The "Hide Shorts Dislike" Preference

In `Settings.x`, YTLite defines a toggle that appears in its settings panel:

```objc
// Settings.x – preference entry
[self switchWithTitle:@"HideShortsDislike" key:@"hideShortsDislike"]

```

This creates a user-facing option with the localized title "Hide Shorts Dislike" and stores the preference under the key `hideShortsDislike` in YTLite's preference plist.

### Runtime Hook Implementation

The actual enforcement happens in `YTLite.x` through a method hook on `YTReelWatchPlaybackOverlayView`:

```objc
// YTLite.x – UI hook that obeys the preference
%hook YTReelWatchPlaybackOverlayView
- (void)setReelDislikeButton:(id)arg1 {
    if (!ytlBool(@"hideShortsDislike")) %orig;
}
%end

```

The `ytlBool()` function retrieves the boolean value from preferences. When `hideShortsDislike` is **true**, the hook returns without calling `%orig`, effectively suppressing the dislike button. When **false**, it invokes the original implementation, allowing the Return-YouTube-Dislikes tweak to inject the count as normal.

## Key Technical Files and Their Roles

| File | Purpose | Location |
|------|---------|----------|
| `YTLite.x` | Core tweak implementation; contains the `setReelDislikeButton` hook for Shorts dislike visibility | `YTLite.x` |
| `Settings.x` | Settings UI construction; defines the `hideShortsDislike` toggle | `Settings.x` |
| [`.github/workflows/_build_tweaks.yml`](https://github.com/dayanch96/YTLite/blob/main/.github/workflows/_build_tweaks.yml) | CI automation; clones and builds Return-YouTube-Dislikes for bundling | [`.github/workflows/_build_tweaks.yml`](https://github.com/dayanch96/YTLite/blob/main/.github/workflows/_build_tweaks.yml) |
| [`README.md`](https://github.com/dayanch96/YTLite/blob/main/README.md) | Documentation; explains Return-YouTube-Dislikes integration to users | [`README.md`](https://github.com/dayanch96/YTLite/blob/main/README.md) |

## Comparison: Two Approaches to Dislike Restoration

| Aspect | Return-YouTube-Dislikes (standalone) | YTLite's bundled approach |
|--------|--------------------------------------|---------------------------|
| **Installation** | Separate package installation | Single-package deployment |
| **Maintenance** | Independent updates | Synchronized with YTLite releases |
| **API source** | Community-maintained database | Same database via bundled code |
| **User control** | Global on/off | Granular control (Shorts-specific toggle) |
| **Code ownership** | External project (`PoomSmart/Return-YouTube-Dislikes`) | Integration layer in `dayanch96/YTLite` |

## Summary

- YTLite shows YouTube dislike counts by **bundling the Return-YouTube-Dislikes tweak** rather than implementing its own API client.
- The bundling occurs at **build time** through the CI workflow in [`.github/workflows/_build_tweaks.yml`](https://github.com/dayanch96/YTLite/blob/main/.github/workflows/_build_tweaks.yml).
- Return-YouTube-Dislikes performs **runtime method swizzling** to inject counts from its public API into YouTube's UI.
- YTLite provides **user-controlled visibility** for Shorts dislikes via the `hideShortsDislike` preference, implemented in `Settings.x` and enforced in `YTLite.x`.

## Frequently Asked Questions

### Does YTLite fetch dislike data directly from YouTube's servers?

No. YTLite relies on the bundled Return-YouTube-Dislikes tweak, which queries a separate community-maintained API. This API aggregates historical dislike data collected before YouTube removed public counts, plus extrapolated estimates for newer videos.

### Can I use YTLite's dislike feature without installing Return-YouTube-Dislikes separately?

Yes. YTLite's distribution includes a pre-compiled version of Return-YouTube-Dislikes. The CI workflow in [`.github/workflows/_build_tweaks.yml`](https://github.com/dayanch96/YTLite/blob/main/.github/workflows/_build_tweaks.yml) automatically clones and builds the external tweak, so end users receive both components in a single installation package.

### Why does YTLite have a separate toggle just for hiding Shorts dislikes?

The `hideShortsDislike` preference in `Settings.x` addresses a specific UI preference. Some users want dislike counts on regular videos but find them distracting in the Shorts feed. The hook in `YTLite.x` that intercepts `setReelDislikeButton:` allows this granular control without affecting the main video player interface.

### What happens to dislike counts if the Return-YouTube-Dislikes API becomes unavailable?

If the API becomes unreachable, the Return-YouTube-Dislikes tweak would fail to retrieve data, and no dislike count would appear in the YouTube UI. YTLite itself does not implement fallback logic or cached data storage for this scenario, as it delegates all count retrieval to the bundled dependency.