XNotForMe: removing the 'For You' tab from X on iOS

Edoardo 🇮🇹 Jul 15, 2024 4 min read
This is a short write-up of XNotForMe, a quick tweak I built to hide the For You tab in X/Twitter.
Update (May 2026): I rewrote the tweak for X v11.88. The original sections below still cover the v10.3.2 version and the high-level idea; the new screenshot and pointers to the updated hooks are in Update: May 2026.

Introduction #

After Twitter effectively banned third-party clients through API policy changes, I tried to keep using the official app.
The main blocker for me was the forced For You feed. I only wanted the chronological Following timeline.

For You felt like a machine for endless scrolling: ads, unrelated topics, rage bait, and random noise designed to keep me in the app longer.

So I built a tiny tweak that does one thing: remove the For You tab.

X timeline with only the Following tab visible

Code #

After some late-night tinkering, this is the quick-and-dirty tweak I ended up with:

 1#import <Foundation/Foundation.h>
 2#import <UIKit/UIKit.h>
 3
 4@interface TFNScrollingSegmentedViewController : UIViewController
 5- (id)parentViewController;
 6@end
 7
 8%hook TFNScrollingSegmentedViewController
 9
10-(NSInteger)pagingViewController:(id)arg1 numberOfPagesInSection:(id)arg2 {
11    if([[self.parentViewController class] isEqual:NSClassFromString(@"THFHomeTimelineContainerViewController")]) {
12        return 1;
13    }
14    return %orig;
15}
16
17-(NSInteger)selectedIndex {
18    if([[self.parentViewController class] isEqual:NSClassFromString(@"THFHomeTimelineContainerViewController")]) {
19        return 1;
20    }
21    return %orig;
22}
23
24-(NSInteger)initialSelectedIndex {
25    if([[self.parentViewController class] isEqual:NSClassFromString(@"THFHomeTimelineContainerViewController")]) {
26        return 1;
27    }
28    return %orig;
29}
30
31-(id)pagingViewController:(id)arg1 viewControllerAtIndexPath:(id)arg2 {
32    if([[self.parentViewController class] isEqual:NSClassFromString(@"THFHomeTimelineContainerViewController")]) {
33        return %orig(arg1, [NSIndexPath indexPathForRow:1 inSection:0]);
34    }
35    return %orig;
36}
37
38%end
39
40@interface TFNScrollingHorizontalLabelView
41- (id)delegate;
42@end
43
44%hook TFNScrollingHorizontalLabelView
45- (void)layoutSubviews {
46    if([[self.delegate class] isEqual:NSClassFromString(@"TFNScrollingSegmentedViewController")]) {
47        TFNScrollingSegmentedViewController *segmentedController = (TFNScrollingSegmentedViewController *)self.delegate;
48        if ([[segmentedController.parentViewController class] isEqual:NSClassFromString(@"THFHomeTimelineContainerViewController")]) {
49            return;
50        }
51    }
52    %orig;
53}
54%end

Hooks #

The tweak hooks two internal classes:

  • TFNScrollingSegmentedViewController
  • TFNScrollingHorizontalLabelView

1) Force one page and one selected index #

In TFNScrollingSegmentedViewController, I override:

  • pagingViewController:numberOfPagesInSection: -> return 1
  • selectedIndex -> return 1
  • initialSelectedIndex -> return 1
  • pagingViewController:viewControllerAtIndexPath: -> redirect to row 1

The viewControllerAtIndexPath override is important. Even if the UI says there is one page, you still need to map that page to the right underlying controller. In this setup, Following sits at row 1 in the app’s internal pager, so the hook always redirects there.

2) Hide segmented labels #

I also hook layoutSubviews in TFNScrollingHorizontalLabelView.

When the delegate is the home timeline segmented controller, I return early and skip layout:

1- (void)layoutSubviews {
2    if ([[self.delegate class] isEqual:NSClassFromString(@"TFNScrollingSegmentedViewController")]) {
3        TFNScrollingSegmentedViewController *segmentedController = (TFNScrollingSegmentedViewController *)self.delegate;
4        if ([[segmentedController.parentViewController class] isEqual:NSClassFromString(@"THFHomeTimelineContainerViewController")]) {
5            return;
6        }
7    }
8    %orig;
9}

This prevents leftover tab labels from rendering.

Installation #

I usually run this with X v10.3.2 and BHTwitter v4.0, which strips ads and other annoyances on top of removing For You.

Install it by building the tweak from the XNotForMe repository and injecting/signing it with your usual jailbreak or sideload workflow.

Limits #

This is a quick-and-dirty tweak tied to X app internals, so version changes can break it. It is not an App Store solution, and it does not try to cover every timeline surface. I tested it against X v10.3.2 (as noted in the repo), and newer versions may need updated class names.

Disclaimer

X, Twitter, and related names/logos are trademarks of their respective owners. This project is independent and for educational/personal-use purposes only.

I am not responsible for misuse, account restrictions, data loss, device issues, or any other damage that may result from using this tweak.

Update: May 2026 (X v11.88) #

Two years on, X is still pushing For You and the original tweak no longer works on the current build. I rewrote it against v11.88 and used the rewrite to fix two things that bothered me on the old version:

  • the empty strip under the X logo where the tab labels used to live
  • the timeline snapping back to the top on every cold start
X timeline on v11.88: Following only, no top tab strip, scroll position preserved across launches

The full source is in the same n3d1117/XNotForMe repository. Internals shifted enough that the hooks themselves changed, so I won’t walk through them line by line - the updated Tweak.xm on main has the current set.

I also pushed an extras branch with a few optional features layered on top: hiding promoted tweets and the “Who to follow” module, dropping the “new posts” pill, trimming the bottom tab bar down to Home and Search, killing Premium upsells, plus smaller toggles for sensitive-content warnings, GIF autoplay, Articles, search history, and reel-style video paging. Each lives in its own %group so it can be enabled independently.

Conclusion #

Modern social feeds are sadly engineered to be addictive and compulsive. If you do nothing, they pick what you see and how long you stay.

XNotForMe is my way of taking that control back: show me people I chose to follow, in order, and stop pushing attention traps.

References #