How to Enable Advanced Mode in YTLite Settings: A Complete Guide
Enable Advanced Mode in YTLite by toggling the "Advanced" switch in Settings → Version, or tap "Yes" on the first-launch reminder dialog.
Advanced Mode unlocks hidden customization options in YTLite, a popular open-source tweak for enhancing the YouTube experience on iOS. This guide walks through both methods to enable Advanced Mode, explains how the setting works under the hood, and shows you what becomes available once it's activated.
What Advanced Mode Unlocks in YTLite
When you enable Advanced Mode in YTLite settings, the tweak exposes additional configuration sections that are hidden by default. These include:
- Navbar — customize navigation bar items and behavior
- Overlay — modify video overlay elements and controls
- Player — access extra player control options
- Shorts — fine-tune YouTube Shorts functionality
- Other — miscellaneous advanced tweaks
The YTLite source code uses the ytlBool(@"advancedMode") check throughout these sections to conditionally render the extra options. Without Advanced Mode enabled, these rows simply don't appear in the settings interface.
Method 1: Enable via Settings UI
The most straightforward way to enable Advanced Mode is through YTLite's built-in settings interface.
Step-by-Step Instructions
- Open YTLite → Settings
- Navigate to the Version section
- Toggle the Advanced switch to ON
This approach is implemented in Settings.x at lines 779-783, where the "Advanced" switch is added to the Version picker:
// From Settings.x - Version section
NSArray <YTSettingsSectionItem *> *rows = @[
[self switchWithTitle:@"Advanced" key:@"advancedMode"],
// ... other version-related items
];
The switchWithTitle:key: method creates a toggle that directly controls the advancedMode user default. When you flip this switch, it calls ytlSetBool(YES, @"advancedMode") behind the scenes.
Method 2: Enable via First-Launch Reminder
YTLite offers a one-time opportunity to enable Advanced Mode through a reminder dialog that appears on first launch.
How the Reminder Works
When YTLite launches for the first time, it checks two conditions in YTLite.x (lines 1389-1395):
if (!ytlBool(@"advancedMode") && !ytlBool(@"advancedModeReminder")) {
ytlSetBool(YES, @"advancedModeReminder");
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)),
dispatch_get_main_queue(), ^{
YTAlertView *alertView = [%c(YTAlertView) confirmationDialogWithAction:^{
ytlSetBool(YES, @"advancedMode"); // User tapped "Yes"
} actionTitle:LOC(@"Yes") cancelTitle:LOC(@"No")];
alertView.title = @"YTLite";
alertView.subtitle = [NSString stringWithFormat:LOC(@"AdvancedModeReminder"),
@"YTLite", LOC(@"Version"), LOC(@"Advanced")];
[alertView show];
});
}
The dialog appears 3 seconds after launch and asks: "Enable Advanced Mode?"
- Tap Yes → Advanced Mode is enabled immediately
- Tap No → The dialog closes without enabling; you can still enable later via Settings
The advancedModeReminder flag ensures this dialog only appears once, even if you decline.
How Advanced Mode Works Internally
Understanding the underlying mechanism helps developers extend YTLite or troubleshoot issues.
User Defaults Storage
Advanced Mode state is stored in NSUserDefaults under the key advancedMode as a BOOL. The YTLUserDefaults class (in Utils/YTLUserDefaults.h and Utils/YTLUserDefaults.m) provides a wrapper that:
- Registers default values
- Provides the
standardUserDefaultssingleton - Ensures consistent behavior across the tweak
Convenience Macros
The YTLite.h header defines helper macros for working with user defaults:
// YTLite.h - Macro definitions
#define ytlBool(key) [[NSUserDefaults standardUserDefaults] boolForKey:key]
#define ytlSetBool(value, key) [[NSUserDefaults standardUserDefaults] setBool:value forKey:key]
These macros are used throughout YTLite to check Advanced Mode status:
// Example usage in settings rows
if (ytlBool(@"advancedMode")) {
// Add advanced configuration options
[rows addObject:advancedNavbarRow];
[rows addObject:advancedOverlayRow];
// ...
}
Enabling Advanced Mode Programmatically
For developers building on YTLite or creating companion tweaks, here's how to enable Advanced Mode in code:
#import "YTLite.h"
// Enable Advanced Mode
ytlSetBool(YES, @"advancedMode");
// Verify the change
BOOL isAdvanced = ytlBool(@"advancedMode");
NSLog(@"Advanced Mode enabled: %@", isAdvanced ? @"YES" : @"NO");
To disable:
ytlSetBool(NO, @"advancedMode");
Summary
- Advanced Mode in YTLite unlocks hidden customization sections for Navbar, Overlay, Player, Shorts, and other features
- Enable via Settings: Navigate to YTLite → Settings → Version → toggle "Advanced" switch
- Enable via reminder: Tap "Yes" on the first-launch dialog that appears 3 seconds after initial launch
- Both methods write to the same
advancedModekey inNSUserDefaultsusing theytlSetBoolmacro - Source locations: Reminder dialog in
YTLite.x(lines 1389-1395), settings UI inSettings.x(lines 779-783), defaults system inUtils/YTLUserDefaults.handUtils/YTLUserDefaults.m
Frequently Asked Questions
What happens if I miss the first-launch reminder dialog?
You can still enable Advanced Mode at any time through the Settings UI. Navigate to YTLite → Settings → Version and toggle the "Advanced" switch. The reminder dialog only appears once and serves as a convenience, not a requirement.
Does enabling Advanced Mode affect YouTube's performance?
Advanced Mode itself is just a boolean flag that controls UI visibility. The actual performance impact depends on which advanced features you subsequently enable. Many advanced options are cosmetic changes with minimal overhead, while others like certain player modifications may have more noticeable effects.
Can I disable Advanced Mode after enabling it?
Yes. Return to YTLite → Settings → Version and toggle the "Advanced" switch to OFF. This immediately hides all advanced configuration sections. Your previously configured advanced settings are preserved in the background, so they'll reappear if you re-enable Advanced Mode later.
Where is the Advanced Mode setting stored?
The setting is stored in iOS NSUserDefaults under the key advancedMode as a boolean value. The YTLite source code uses ytlSetBool and ytlBool macros (defined in YTLite.h) to read and write this value consistently across the tweak.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →