Skip to content

Commit

Permalink
Merge branch 'YTLitePlus:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Amazon90 authored Dec 5, 2024
2 parents 3798623 + fc3cb97 commit b3120b2
Show file tree
Hide file tree
Showing 26 changed files with 103 additions and 47 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/buildapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
inputs:
sdk_version:
description: "iOS SDK Version"
default: "16.5"
default: "17.5"
required: true
type: string
decrypted_youtube_url:
Expand Down Expand Up @@ -54,7 +54,7 @@ concurrency:
jobs:
build:
name: Build YTLitePlus
runs-on: macos-12
runs-on: macos-13
permissions:
contents: write

Expand All @@ -73,7 +73,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: theos/theos
ref: 3da31488281ecf4394d10302d2629607f4a1aa07
ref: master
path: theos
submodules: recursive

Expand All @@ -91,7 +91,7 @@ jobs:
if: steps.SDK.outputs.cache-hit != 'true'
run: |
# Only download the specific SDK version
git clone -n --depth=1 --filter=tree:0 https://github.com/theos/sdks/
git clone -n --depth=1 --filter=tree:0 https://github.com/aricloverALT/sdks/
cd sdks
git sparse-checkout set --no-cone iPhoneOS${{ inputs.sdk_version }}.sdk
git checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-submodules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.2

- name: Set up Git
run: |
Expand Down
6 changes: 5 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/PoomSmart/PSHeader.git
[submodule "Tweaks/FLEX"]
path = Tweaks/FLEX
url = https://github.com/qnblackcat/FLEX-Classes.git
url = https://github.com/PoomSmart/FLEXing.git
[submodule "Tweaks/iSponsorBlock"]
path = Tweaks/iSponsorBlock
url = https://github.com/Galactic-Dev/iSponsorBlock.git
Expand Down Expand Up @@ -58,3 +58,7 @@
[submodule "Tweaks/YouLoop"]
path = Tweaks/YouLoop
url = https://github.com/bhackel/YouLoop
[submodule "Tweaks/FLEXing"]
path = Tweaks/FLEXing
url = https://github.com/PoomSmart/FLEXing.git
branch = rootless
1 change: 1 addition & 0 deletions Bundles/DontEatMyContent.bundle
1 change: 1 addition & 0 deletions Bundles/RYD.bundle
1 change: 1 addition & 0 deletions Bundles/YTABC.bundle
1 change: 1 addition & 0 deletions Bundles/YTHoldForSpeed.bundle
1 change: 1 addition & 0 deletions Bundles/YTLite.bundle
1 change: 1 addition & 0 deletions Bundles/YTUHD.bundle
1 change: 1 addition & 0 deletions Bundles/YTVideoOverlay.bundle
1 change: 1 addition & 0 deletions Bundles/YouLoop.bundle
1 change: 1 addition & 0 deletions Bundles/YouMute.bundle
1 change: 1 addition & 0 deletions Bundles/YouPiP.bundle
1 change: 1 addition & 0 deletions Bundles/YouQuality.bundle
1 change: 1 addition & 0 deletions Bundles/YouTimeStamp.bundle
1 change: 1 addition & 0 deletions Bundles/iSponsorBlock.bundle
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
TARGET = iphone:clang:16.5:14.0
TARGET = iphone:clang:17.5:14.0
SDK_PATH = $(THEOS)/sdks/iPhoneOS17.5.sdk/
SYSROOT = $(SDK_PATH)
ARCHS = arm64
MODULES = jailed
FINALPACKAGE = 1
CODESIGN_IPA = 0
PACKAGE_NAME = YTLitePlus
PACKAGE_VERSION = X.X.X-X.X

libFLEX_ARCHS = arm64

TWEAK_NAME = YTLitePlus
DISPLAY_NAME = YouTube
BUNDLE_ID = com.google.ios.youtube

EXTRA_CFLAGS := $(addprefix -I,$(shell find Tweaks/FLEX -name '*.h' -exec dirname {} \;)) -I$(THEOS_PROJECT_DIR)/Tweaks
EXTRA_CFLAGS := -I$(THEOS_PROJECT_DIR)/Tweaks

# Allow YouTubeHeader to be accessible using #include <...>
export ADDITIONAL_CFLAGS = -I$(THEOS_PROJECT_DIR)/Tweaks

YTLitePlus_INJECT_DYLIBS = Tweaks/YTLite/var/jb/Library/MobileSubstrate/DynamicLibraries/YTLite.dylib .theos/obj/libcolorpicker.dylib .theos/obj/iSponsorBlock.dylib .theos/obj/YTUHD.dylib .theos/obj/YouPiP.dylib .theos/obj/YouTubeDislikesReturn.dylib .theos/obj/YTABConfig.dylib .theos/obj/YouMute.dylib .theos/obj/DontEatMyContent.dylib .theos/obj/YTHoldForSpeed.dylib .theos/obj/YTVideoOverlay.dylib .theos/obj/YouGroupSettings.dylib .theos/obj/YouQuality.dylib .theos/obj/YouTimeStamp.dylib .theos/obj/YouLoop.dylib
YTLitePlus_INJECT_DYLIBS = Tweaks/YTLite/var/jb/Library/MobileSubstrate/DynamicLibraries/YTLite.dylib .theos/obj/libFLEX.dylib .theos/obj/libcolorpicker.dylib .theos/obj/iSponsorBlock.dylib .theos/obj/YTUHD.dylib .theos/obj/YouPiP.dylib .theos/obj/YouTubeDislikesReturn.dylib .theos/obj/YTABConfig.dylib .theos/obj/YouMute.dylib .theos/obj/DontEatMyContent.dylib .theos/obj/YTHoldForSpeed.dylib .theos/obj/YTVideoOverlay.dylib .theos/obj/YouGroupSettings.dylib .theos/obj/YouQuality.dylib .theos/obj/YouTimeStamp.dylib .theos/obj/YouLoop.dylib
YTLitePlus_FILES = YTLitePlus.xm $(shell find Source -name '*.xm' -o -name '*.x' -o -name '*.m') $(shell find Tweaks/FLEX -type f \( -iname \*.c -o -iname \*.m -o -iname \*.mm \))
YTLitePlus_IPA = ./tmp/Payload/YouTube.app
YTLitePlus_CFLAGS = -fobjc-arc -Wno-deprecated-declarations -Wno-unsupported-availability-guard -Wno-unused-but-set-variable -DTWEAK_VERSION=$(PACKAGE_VERSION) $(EXTRA_CFLAGS)
Expand All @@ -23,7 +28,7 @@ YTLitePlus_USE_FISHHOOK = 0

include $(THEOS)/makefiles/common.mk
include $(THEOS_MAKE_PATH)/tweak.mk
SUBPROJECTS += Tweaks/Alderis Tweaks/iSponsorBlock Tweaks/YTUHD Tweaks/YouPiP Tweaks/Return-YouTube-Dislikes Tweaks/YTABConfig Tweaks/YouMute Tweaks/DontEatMyContent Tweaks/YTHoldForSpeed Tweaks/YTVideoOverlay Tweaks/YouQuality Tweaks/YouTimeStamp Tweaks/YouGroupSettings Tweaks/YouLoop
SUBPROJECTS += Tweaks/Alderis Tweaks/FLEXing/libflex Tweaks/iSponsorBlock Tweaks/YTUHD Tweaks/YouPiP Tweaks/Return-YouTube-Dislikes Tweaks/YTABConfig Tweaks/YouMute Tweaks/DontEatMyContent Tweaks/YTHoldForSpeed Tweaks/YTVideoOverlay Tweaks/YouQuality Tweaks/YouTimeStamp Tweaks/YouGroupSettings Tweaks/YouLoop
include $(THEOS_MAKE_PATH)/aggregate.mk

YTLITE_PATH = Tweaks/YTLite
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
![GitHub issues](https://img.shields.io/github/issues-raw/Balackburn/YTLitePlus?style=flat&labelColor=%23000000&color=%23000000)
[![Platform](https://img.shields.io/badge/Platform-iOS%20%7C%20iPadOS%2014.0%2B-black?labelColor=black&style=flat)](https://developer.apple.com/iphone/index.action)
<a href="https://github.com/YTLitePlus/YTLitePlus/commit"><img src="https://custom-icon-badges.demolab.com/github/last-commit/Balackburn/YTLitePlus?style=flat&color=black&labelColor=black&logo=history&logoColor=white&label=Last commit" alt="Badge"></img></a>
<a href="https://github.com/YTLitePlus/YTLitePlus/releases/latest"><img src="https://custom-icon-badges.demolab.com/github/v/release/Balackburn/YTLitePlus?labelColor=black&style=flat&color=black&label=Latest%20release" alt="Badge"></img></a>

# Table of Contents
<a href="#credits"><img src="https://raw.githubusercontent.com/YTLitePlus/Assets/main/Github/Buttons/TableOfContents/Credits.png" width="170"></a>
Expand Down
3 changes: 2 additions & 1 deletion Source/Settings.xm
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,8 @@ static const NSInteger YTLiteSection = 789;
// Import mode: Handle the import of settings from a text file
NSString *fileType = [pickedURL resourceValuesForKeys:@[NSURLTypeIdentifierKey] error:&error][NSURLTypeIdentifierKey];

if (UTTypeConformsTo((__bridge CFStringRef)fileType, kUTTypePlainText)) {
UTType *utType = [UTType typeWithIdentifier:fileType];
if ([utType conformsToType:UTTypePlainText]) {
NSString *fileContents = [NSString stringWithContentsOfURL:pickedURL encoding:NSUTF8StringEncoding error:nil];
NSArray *lines = [fileContents componentsSeparatedByString:@"\n"];
for (NSString *line in lines) {
Expand Down
82 changes: 59 additions & 23 deletions Source/VersionSpooferLite.xm
Original file line number Diff line number Diff line change
Expand Up @@ -28,80 +28,116 @@ static BOOL version6() {
static BOOL version7() {
return IsEnabled(@"enableVersionSpoofer_enabled") && appVersionSpoofer() == 7;
}
static BOOL version8() {
return IsEnabled(@"enableVersionSpoofer_enabled") && appVersionSpoofer() == 8;
}
static BOOL version9() {
return IsEnabled(@"enableVersionSpoofer_enabled") && appVersionSpoofer() == 9;
}
static BOOL version10() {
return IsEnabled(@"enableVersionSpoofer_enabled") && appVersionSpoofer() == 10;
}

%group gVersion0
%hook YTVersionUtils // Last v18 App Version (Memory Leak errors are gone in v18.35.4+)
+ (NSString *)appVersion { return @"18.49.3"; }
%hook YTVersionUtils // New 2024 Thin Outline Icons
+ (NSString *)appVersion { return @"19.28.1"; }
%end
%end

%group gVersion1
%hook YTVersionUtils // Brings back Library Tab - Deprecated
+ (NSString *)appVersion { return @"18.34.5"; }
%hook YTVersionUtils // Restore 2020's Thin Outline Icons
+ (NSString *)appVersion { return @"19.26.5"; }
%end
%end

%group gVersion2
%hook YTVersionUtils // Removes Playables in Explore - Deprecated
+ (NSString *)appVersion { return @"18.33.3"; }
%hook YTVersionUtils // Last v18 App Version
+ (NSString *)appVersion { return @"18.49.3"; }
%end
%end

%group gVersion3
%hook YTVersionUtils // Fixes YTClassicVideoQuality + YTSpeed - Deprecated
+ (NSString *)appVersion { return @"18.18.2"; }
%hook YTVersionUtils // Oldest Supported App Version (v18) - this is a replacement of v17.33.2.
+ (NSString *)appVersion { return @"18.35.4"; }
%end
%end

%group gVersion4
%hook YTVersionUtils // First v18 App Version - Deprecated
+ (NSString *)appVersion { return @"18.01.2"; }
%hook YTVersionUtils // Brings back Library Tab - Deprecated/Unsupported
+ (NSString *)appVersion { return @"18.34.5"; }
%end
%end

%group gVersion5
%hook YTVersionUtils // Last v17 App Version - Deprecated
+ (NSString *)appVersion { return @"17.49.6"; }
%hook YTVersionUtils // Removes Playables in Explore - Deprecated/Unsupported
+ (NSString *)appVersion { return @"18.33.3"; }
%end
%end

%group gVersion6
%hook YTVersionUtils // v17.38.10 Fixes LowContrastMode + No Rounded Thumbnails - Deprecated
+ (NSString *)appVersion { return @"17.38.10"; }
%hook YTVersionUtils // Fixes YTClassicVideoQuality + YTSpeed - Deprecated/Unsupported
+ (NSString *)appVersion { return @"18.18.2"; }
%end
%end

%group gVersion7
%hook YTVersionUtils // Oldest Supported App Version (v17) - Deprecated
%hook YTVersionUtils // First v18 App Version - Deprecated/Unsupported
+ (NSString *)appVersion { return @"18.01.2"; }
%end
%end

%group gVersion8
%hook YTVersionUtils // Last v17 App Version - Deprecated/Unsupported
+ (NSString *)appVersion { return @"17.49.6"; }
%end
%end

%group gVersion9
%hook YTVersionUtils // v17.38.10 Fixes LowContrastMode + No Rounded Thumbnails - Deprecated/Unsupported
+ (NSString *)appVersion { return @"17.38.10"; }
%end
%end

%group gVersion10
%hook YTVersionUtils // Oldest Supported App Version (v17) - Deprecated/Unsupported
+ (NSString *)appVersion { return @"17.33.2"; }
%end
%end

# pragma mark - ctor
%ctor {
%init;
if (version0()) { // 0
if (version0()) {
%init(gVersion0);
}
if (version1()) { // 1
if (version1()) {
%init(gVersion1);
}
if (version2()) { // 2
if (version2()) {
%init(gVersion2);
}
if (version3()) { // 3
if (version3()) {
%init(gVersion3);
}
if (version4()) { // 4
if (version4()) {
%init(gVersion4);
}
if (version5()) { // 5
if (version5()) {
%init(gVersion5);
}
if (version6()) { // 6
if (version6()) {
%init(gVersion6);
}
if (version7()) { // 7
if (version7()) {
%init(gVersion7);
}
if (version8()) {
%init(gVersion8);
}
if (version9()) {
%init(gVersion9);
}
if (version10()) {
%init(gVersion10);
}
}
1 change: 0 additions & 1 deletion Tweaks/FLEX
Submodule FLEX deleted from 208301
1 change: 1 addition & 0 deletions Tweaks/FLEXing
Submodule FLEXing added at 8373b7
4 changes: 2 additions & 2 deletions YTLitePlus.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#import <AVFoundation/AVFoundation.h>
#import <AVKit/AVKit.h> // For AVPlayer and AVPlayerViewController
#import <MobileCoreServices/MobileCoreServices.h> // For kUTTypeMovie and kUTTypeVideo
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>

#import "Tweaks/FLEX/FLEX.h"
#import "Tweaks/YouTubeHeader/YTAppDelegate.h"
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
#import "Tweaks/YouTubeHeader/YTQTMButton.h"
Expand Down Expand Up @@ -130,7 +130,7 @@ typedef NS_ENUM(NSUInteger, GestureSection) {
@property (nonatomic, assign, readwrite) BOOL enableSnapToChapter;
@end

// Hide YouTube Plus incompatibility warning popup - @bhackel
// HelperVC - @bhackel
@interface HelperVC : UIViewController
@end

Expand Down
12 changes: 5 additions & 7 deletions YTLitePlus.xm
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ static NSString *accessGroupID() {
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions {
BOOL didFinishLaunching = %orig;

if (IsEnabled(@"flex_enabled")) {
[[FLEXManager sharedManager] showExplorer];
if (IsEnabled(@"flex_enabled")) {
[[%c(FLEXManager) performSelector:@selector(sharedManager)] performSelector:@selector(showExplorer)];
}

return didFinishLaunching;
}
- (void)appWillResignActive:(id)arg1 {
%orig;
if (IsEnabled(@"flex_enabled")) {
[[FLEXManager sharedManager] showExplorer];
if (IsEnabled(@"flex_enabled")) {
[[%c(FLEXManager) performSelector:@selector(sharedManager)] performSelector:@selector(showExplorer)];
}
}
%end
Expand Down Expand Up @@ -1070,7 +1068,7 @@ NSInteger pageStyle = 0;

if (settingsViewController) {
// Present the video picker
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[(NSString *)kUTTypeMovie, (NSString *)kUTTypeVideo] inMode:UIDocumentPickerModeImport];
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[(NSString *)UTTypeMovie.identifier, (NSString *)UTTypeVideo.identifier] inMode:UIDocumentPickerModeImport];
documentPicker.delegate = (id<UIDocumentPickerDelegate>)self;
documentPicker.allowsMultipleSelection = NO;
[settingsViewController presentViewController:documentPicker animated:YES completion:nil];
Expand Down
2 changes: 1 addition & 1 deletion lang/YTLitePlus.bundle/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"NEW_MINIPLAYER_STYLE" = "نمط شريط miniplayer جديد (BigYTMiniPlayer)";
"NEW_MINIPLAYER_STYLE_DESC" = "مطلوب إعادة تشغيل التطبيق";

"HIDE_CAST_BUTTON" = "زر "إخفاء الإرسال" ;
"HIDE_CAST_BUTTON" = "Hide Cast Button";
"HIDE_CAST_BUTTON_DESC" = "مطلوب إعادة تشغيل التطبيق";

"VIDEO_PLAYER_BUTTON" = "Video Player Button";
Expand Down
2 changes: 1 addition & 1 deletion lang/YTLitePlus.bundle/vi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"MSG_YES" = "Có";
"MSG_CANCEL" = "Không";

"NEW_MINIPLAYER_STYLE" = Trình phát thu nhỏ kiểu mới";
"NEW_MINIPLAYER_STYLE" = "Trình phát thu nhỏ kiểu mới";
"NEW_MINIPLAYER_STYLE_DESC" = "Thay thế trình phát thu nhỏ mặc định thành (BigYTMiniPlayer). Cần khởi động lại ứng dụng.";

"HIDE_CAST_BUTTON" = "Ẩn nút truyền";
Expand Down

0 comments on commit b3120b2

Please sign in to comment.