From 25f6d144c1ce65851b23b7fc74016fb90d013555 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:03:54 -0500 Subject: [PATCH 01/19] Remove Duplicates (uYouPlus.h) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PoomSmart’s YouTubeHeader has been updated which broke uYouPlus.h. Should be resolved now! --- Sources/uYouPlus.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index bf8c680..ca38658 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -61,9 +61,7 @@ @interface YTPlayerBarController : NSObject @property(nonatomic, strong) YTInlinePlayerBarContainerView *playerBar; @end -@interface YTInlinePlayerBarContainerView (uYouEnhanced) -@property(nonatomic, assign) BOOL shouldDisplayTimeRemaining; -@end +// Header has been moved to https://github.com/PoomSmart/YouTubeHeader/blob/main/YTInlinePlayerBarContainerView.h // IAmYouTube @interface SSOConfiguration : NSObject @@ -90,7 +88,7 @@ @end // YTTapToSeek - https://github.com/bhackel/YTTapToSeek -// Header has been moved to https://github.com/arichornlover/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h +// Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h // Enable Premium logo - @bhackel @interface YTITopbarLogoRenderer : NSObject @@ -136,13 +134,10 @@ @end // Disable Pull to Full for landscape videos - @bhackel -@interface YTWatchPullToFullController : NSObject -@property(nonatomic, strong) YTWatchViewController *playerViewSource; -@end -@interface YTWatchViewController (uYouEnhanced) -@property(nonatomic, strong) YTWatchPullToFullController *pullToFullController; -- (NSUInteger) allowedFullScreenOrientations; +// Header has been moved to https://github.com/PoomSmart/YouTubeHeader/blob/main/YTWatchPullToFullController.h + // Fullscreen to the Right (uYouEnhanced Version) - @arichornlover +@interface YTWatchViewController (uYouEnhanced) - (UIInterfaceOrientationMask) supportedInterfaceOrientations; - (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation; - (void)forceRightFullscreenOrientation; From e8ba831fa248c796893009181862bf261f2f7d62 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:06:07 -0500 Subject: [PATCH 02/19] Update uYouPlus.h --- Sources/uYouPlus.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index ca38658..6b82a3f 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -58,9 +58,7 @@ #define LOWCONTRASTMODE_CUTOFF_VERSION @"17.38.10" // LowContrastMode (v17.33.2-17.38.10) // Always show remaining time in video player - @bhackel -@interface YTPlayerBarController : NSObject -@property(nonatomic, strong) YTInlinePlayerBarContainerView *playerBar; -@end +// Header has been moved to https://github.com/PoomSmart/YouTubeHeader/blob/main/YTPlayerBarController.h // Header has been moved to https://github.com/PoomSmart/YouTubeHeader/blob/main/YTInlinePlayerBarContainerView.h // IAmYouTube From 796e88ec464ff3e0418bbb64d937344deb1acaa3 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 09:20:24 +0000 Subject: [PATCH 03/19] Improve uYouPlus.h New Headers & Organized the imports better. --- Sources/uYouPlus.h | 67 +++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 6b82a3f..212e72c 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -1,43 +1,48 @@ #import -#import -#import #import -#import +#import #import -#import -#import +#import +#import #import - -#import "uYouPlusThemes.h" // Hide "Buy Super Thanks" banner (_ASDisplayView) -#import // Activate FLEX -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import #import #import #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import #import -#import -#import -#import +#import +#import +#import +#import +#import +#import #import -#import // Fixes uYou crash when trying to play video (#1422) +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import "uYouPlusThemes.h" // uYouPlus Themes // Hide buttons under the video player by @PoomSmart #import From af5b399e55e446f9537b1dcc371050ed6c3b8e05 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:20:51 -0500 Subject: [PATCH 04/19] Update uYouPlus.h --- Sources/uYouPlus.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 212e72c..9c2f2f8 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -44,16 +44,6 @@ #import #import "uYouPlusThemes.h" // uYouPlus Themes -// Hide buttons under the video player by @PoomSmart -#import -#import -#import - -// YouTube-X -#import -#import -#import - #define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil] #define IS_ENABLED(k) [[NSUserDefaults standardUserDefaults] boolForKey:k] #define APP_THEME_IDX [[NSUserDefaults standardUserDefaults] integerForKey:@"appTheme"] From 22974cecb0735efc85d2c4584f949c576d823b25 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:46:34 -0500 Subject: [PATCH 05/19] Added New Header (uYouPlusPatches.h) --- Sources/uYouPlusPatches.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/uYouPlusPatches.h b/Sources/uYouPlusPatches.h index 6dcac73..e9b74f6 100644 --- a/Sources/uYouPlusPatches.h +++ b/Sources/uYouPlusPatches.h @@ -85,6 +85,10 @@ + (GPBExtensionDescriptor*)innertubeCommand; @end +@interface YTAccountScopedCommandResponderEvent +@property (nonatomic, strong, readwrite) YTICommand *command; +@end + @interface YTIShareEntityEndpoint @property (nonatomic, assign, readwrite) BOOL hasSerializedShareEntity; @property (nonatomic, copy, readwrite) NSString *serializedShareEntity; From 1e932bb00d3fb0695048ed7151ed6b22c4dd992a Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 20:17:00 -0500 Subject: [PATCH 06/19] Add a workaround to compiling error (README.md) --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 2823f9e..8665164 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# How to fix the "remote: Repository not found." Error (buildapp.yml) ⚠️ +In order to simply fix this problem go to **Actions** and then go to **Update Submodules** and right as soon as you get there then trigger the **Run Workflow** + +Also please know that I can't trigger actions when my account is flagged so I can't update them on uYouEnhanced myself. + +# uYouEnhanced

UYOUPLUS_LOGO From 9638e454a8efffb02b47d25ccf1a09bcdc001da1 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 23:25:55 -0500 Subject: [PATCH 07/19] Update uYouPlus.h --- Sources/uYouPlus.h | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 9c2f2f8..a1fbeb4 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -27,6 +27,7 @@ #import #import #import +#import #import #import #import @@ -76,12 +77,10 @@ // Hide Home Tab - @bhackel @interface YTPivotBarItemViewAccessibilityControl : UIControl @end -@interface YTPivotBarItemView (uYouEnhanced) -@property (nonatomic, strong) YTPivotBarItemViewAccessibilityControl *hitTarget; -@end +// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h // YTTapToSeek - https://github.com/bhackel/YTTapToSeek -// Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h +// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h // Enable Premium logo - @bhackel @interface YTITopbarLogoRenderer : NSObject @@ -113,12 +112,7 @@ - (BOOL)hasIcon; - (BOOL)hasThumbnail; @end -@interface YTIItemSectionSupportedRenderers (uYouEnhanced) -@property(readonly, nonatomic) YTICompactLinkRenderer *compactLinkRenderer; -@property(readonly, nonatomic) YTICompactListItemRenderer *compactListItemRenderer; -- (BOOL)hasCompactLinkRenderer; -- (BOOL)hasCompactListItemRenderer; -@end +// YTIItemSectionSupportedRenderers Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTIItemSectionSupportedRenderers.h @interface YTAppCollectionViewController : YTInnerTubeCollectionViewController - (void)uYouEnhancedFakePremiumModel:(YTISectionListRenderer *)model; @end @@ -127,7 +121,7 @@ @end // Disable Pull to Full for landscape videos - @bhackel -// Header has been moved to https://github.com/PoomSmart/YouTubeHeader/blob/main/YTWatchPullToFullController.h +// YTWatchPullToFullController Header has been moved to https://github.com/PoomSmart/YouTubeHeader/blob/main/YTWatchPullToFullController.h // Fullscreen to the Right (uYouEnhanced Version) - @arichornlover @interface YTWatchViewController (uYouEnhanced) @@ -183,17 +177,16 @@ // Buttons @interface YTRightNavigationButtons : UIView - (id)_viewControllerForAncestor; -@property(readonly, nonatomic) YTQTMButton *searchButton; -@property(readonly, nonatomic) YTQTMButton *notificationButton; -@property(strong, nonatomic) YTQTMButton *sponsorBlockButton; -@property(strong, nonatomic) YTQTMButton *uYouPlusButton; +@property (readonly, nonatomic) NSArray *dynamicButtons; +@property (readonly, nonatomic) NSArray *visibleButtons; +@property (readonly, nonatomic) NSArray *buttons; +@property (readonly, nonatomic) YTQTMButton *searchButton; +@property (readonly, nonatomic) YTQTMButton *notificationButton; +@property (strong, nonatomic) YTQTMButton *sponsorBlockButton; +@property (strong, nonatomic) YTQTMButton *settingsButton; +- (void)setDynamicButtons:(NSArray *)buttons; - (void)setLeadingPadding:(CGFloat)arg1; -- (void)uYouPlusRootOptionsAction; -@end - -@interface YTISlimMetadataButtonSupportedRenderers : NSObject -- (id)slimButton_buttonRenderer; -- (id)slimMetadataButtonRenderer; +- (void)settingsAction; @end // YTSpeed From ff6d17c88a2d8907533180a8ebccc4575657d233 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 8 Jul 2024 23:28:36 -0500 Subject: [PATCH 08/19] Update uYouPlus.h --- Sources/uYouPlus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index a1fbeb4..39920b7 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -77,10 +77,10 @@ // Hide Home Tab - @bhackel @interface YTPivotBarItemViewAccessibilityControl : UIControl @end -// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h +// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h // YTTapToSeek - https://github.com/bhackel/YTTapToSeek -// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h +// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h // Enable Premium logo - @bhackel @interface YTITopbarLogoRenderer : NSObject From 3682d9a960ea7a5a052d73e8e46d6d1f3e7d9db8 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Wed, 10 Jul 2024 01:26:23 -0500 Subject: [PATCH 09/19] Fix uYouPlus.h Fixed almost every compiling error that had occurred from YouTubeHeader. --- Sources/uYouPlus.h | 44 +++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 39920b7..76cb9c4 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -12,10 +12,15 @@ #import #import #import +#import #import #import #import #import +#import +#import +#import +#import #import #import #import @@ -34,6 +39,7 @@ #import #import #import +#import #import #import #import @@ -41,6 +47,7 @@ #import #import #import +#import #import #import #import "uYouPlusThemes.h" // uYouPlus Themes @@ -77,10 +84,10 @@ // Hide Home Tab - @bhackel @interface YTPivotBarItemViewAccessibilityControl : UIControl @end -// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h +// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h // YTTapToSeek - https://github.com/bhackel/YTTapToSeek -// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h +// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h // Enable Premium logo - @bhackel @interface YTITopbarLogoRenderer : NSObject @@ -88,30 +95,11 @@ @end // Hide Premium Promo in You tab - @bhackel -@interface YTIIconThumbnailRenderer : GPBMessage -@property (nonatomic, strong) YTIIcon *icon; -- (BOOL)hasIcon; -@end -@interface YTICompactListItemThumbnailSupportedRenderers : GPBMessage -@property (nonatomic, strong) YTIIconThumbnailRenderer *iconThumbnailRenderer; -- (BOOL)hasIconThumbnailRenderer; -@end -@interface YTICompactListItemRenderer : GPBMessage -@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail; -@property (nonatomic, strong) YTIFormattedString *title; -- (BOOL)hasThumbnail; -- (BOOL)hasTitle; -@end -@interface YTIIcon (uYouEnhanced) -- (BOOL)hasIconType; -@end -@interface YTICompactLinkRenderer : GPBMessage -@property (nonatomic, strong) YTIIcon *icon; -@property (nonatomic, strong) YTIFormattedString *title; -@property (nonatomic, strong) YTICompactListItemThumbnailSupportedRenderers *thumbnail; -- (BOOL)hasIcon; -- (BOOL)hasThumbnail; -@end +// YTIIconThumbnailRenderer Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTIIconThumbnailRenderer.h +// YTICompactListItemThumbnailSupportedRenderers Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTICompactListItemThumbnailSupportedRenderers.h +// YTICompactListItemRenderer Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTICompactListItemRenderer.h +// YTIIcon Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTIIcon.h +// YTICompactLinkRenderer Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTICompactLinkRenderer.h // YTIItemSectionSupportedRenderers Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTIItemSectionSupportedRenderers.h @interface YTAppCollectionViewController : YTInnerTubeCollectionViewController - (void)uYouEnhancedFakePremiumModel:(YTISectionListRenderer *)model; @@ -201,9 +189,7 @@ - (void)internalSetRate; @end -@interface MLPlayerStickySettings (uYouPlus) -- (void)setRate:(float)rate; -@end +// MLPlayerStickySettings Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/MLPlayerStickySettings.h @interface MLPlayerEventCenter : NSObject - (void)broadcastRateChange:(float)rate; From 4e8aeb5bae6389b5f5993c2978e88da8115d0a8b Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Wed, 10 Jul 2024 01:29:11 -0500 Subject: [PATCH 10/19] Update uYouPlus.h --- Sources/uYouPlus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index 76cb9c4..779c5f8 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -84,10 +84,10 @@ // Hide Home Tab - @bhackel @interface YTPivotBarItemViewAccessibilityControl : UIControl @end -// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h +// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h // YTTapToSeek - https://github.com/bhackel/YTTapToSeek -// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h +// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h // Enable Premium logo - @bhackel @interface YTITopbarLogoRenderer : NSObject From 958bc196ce4277fc2f923a438d0388857b113475 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:25:21 -0500 Subject: [PATCH 11/19] Fix uYouPlus.xm --- Sources/uYouPlus.xm | 52 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 6ccf1dc..f8298fd 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -233,9 +233,10 @@ static __strong NSData *cellDividerData; %end %end -%group gCenterYouTubeLogo +// Center YouTube Logo - @arichornlover +%group gCenterYouTubeLogo // BROKEN %hook YTNavigationBarTitleView -- (void)setShouldCenterNavBarTitleView:(BOOL)center { +- (void)setShouldCenterNavBarTitleView:(BOOL)center { // Doesn't do anything? %orig(YES); } - (BOOL)shouldCenterNavBarTitleView { @@ -301,7 +302,7 @@ static __strong NSData *cellDividerData; - (BOOL)enableModularPlayerBarController { return NO; } // fixes some of the iSponorBlock problems - (BOOL)mainAppCoreClientEnableCairoSettings { return IS_ENABLED(@"newSettingsUI_enabled"); } // New grouped settings UI - (BOOL)enableIosFloatingMiniplayer { return IS_ENABLED(@"floatingMiniplayer_enabled"); } // Floating Miniplayer -- (BOOL)enableIosFloatingMiniplayerSwipeUpToExpand { return IS_ENABLED(@"floatingMiniplayer_enabled"); } // Floating Miniplayer - Fix Swipe Up Animation +- (BOOL)enableIosFloatingMiniplayerSwipeUpToExpand { return IS_ENABLED(@"floatingMiniplayer_enabled"); } // Floating Miniplayer - (BOOL)enableIosFloatingMiniplayerRepositioning { return IS_ENABLED(@"floatingMiniplayer2_enabled"); } // Floating Miniplayer (Repositioning Support, Removes Swiping Up Gesture) %end @@ -578,7 +579,7 @@ static __strong NSData *cellDividerData; } %end -// Classic Video Player - 17.33.2+ (Restores the functionality from the YT v16.xx.x Video Player) - @arichornlover +// Classic Video Player (Restores the v16.xx.x Video Player Functionality) - @arichornlover // To-do: disabling "Precise Video Scrubbing" https://9to5google.com/2022/06/29/youtube-precise-video-scrubbing/ %group gClassicVideoPlayer %hook YTColdConfig @@ -766,7 +767,7 @@ static int contrastMode() { %end // YTTapToSeek - https://github.com/bhackel/YTTapToSeek -%group YTTTS_Tweak +%group gYTTapToSeek %hook YTInlinePlayerBarContainerView - (void)didPressScrubber:(id)arg1 { %orig; @@ -851,6 +852,32 @@ static int contrastMode() { %end %end +// Fullscreen to the Right (iPhone-exclusive) - @arichornlover +// NOTE: Please turn off the “Portrait Fullscreen” Option while the code below is active +%group gFullscreenToTheRight +%hook YTWatchViewController +- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { + if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + return UIInterfaceOrientationLandscapeRight; + } + return %orig; +} +- (UIInterfaceOrientationMask)supportedInterfaceOrientations { + if ([self isFullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + return UIInterfaceOrientationMaskLandscape; + } + return %orig; +} +%new +- (void)forceRightFullscreenOrientation { // custom void + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]; + [[UIDevice currentDevice] setValue:value forKey:@"orientation"]; + } +} +%end +%end + // Disable Double tap to skip chapter - @bhackel %hook YTDoubleTapToSeekController - (void)didTwoFingerDoubleTap:(id)arg1 { @@ -968,7 +995,7 @@ static int contrastMode() { %hook YTWatchPullToFullController - (BOOL)shouldRecognizeOverscrollEventsFromWatchOverscrollController:(id)arg1 { // Get the current player orientation - YTWatchViewController *watchViewController = self.playerViewSource; + YTWatchViewController *watchViewController = (YTWatchViewController *)self.playerViewSource; NSUInteger allowedFullScreenOrientations = [watchViewController allowedFullScreenOrientations]; // Check if the current player orientation is portrait if (allowedFullScreenOrientations == UIInterfaceOrientationMaskAllButUpsideDown @@ -1334,7 +1361,7 @@ static int contrastMode() { static BOOL findCell(ASNodeController *nodeController, NSArray *identifiers) { for (id child in [nodeController children]) { if ([child isKindOfClass:%c(ELMNodeController)]) { - NSArray *elmChildren = [(ELMNodeController *)child children]; + NSArray *elmChildren = [(ELMNodeController * _Nullable)child children]; for (ELMComponent *elmChild in elmChildren) { for (NSString *identifier in identifiers) { if ([[elmChild description] containsString:identifier]) @@ -1344,8 +1371,8 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide } if ([child isKindOfClass:%c(ASNodeController)]) { - ASDisplayNode *childNode = ((ASNodeController *)child).node; // ELMContainerNode - NSArray *yogaChildren = childNode.yogaChildren; + ASDisplayNode *childNode = ((ASNodeController * _Nullable)child).node; // ELMContainerNode + NSArray *yogaChildren = childNode.yogaChildren; for (ASDisplayNode *displayNode in yogaChildren) { if ([identifiers containsObject:displayNode.accessibilityIdentifier]) return YES; @@ -1361,7 +1388,7 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide %hook ASCollectionView // This stopped working on May 14th 2024 due to a Server-Side Change from YouTube. -- (CGSize)sizeForElement:(ASCollectionElement *)element { +- (CGSize)sizeForElement:(ASCollectionElement * _Nullable)element { if ([self.accessibilityIdentifier isEqualToString:@"id.video.scrollable_action_bar"]) { ASCellNode *node = [element node]; ASNodeController *nodeController = [node controller]; @@ -1676,6 +1703,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide if (IS_ENABLED(@"portraitFullscreen_enabled")) { %init(gPortraitFullscreen); } + if (IS_ENABLED(@"fullscreenToTheRight_enabled")) { + %init(gFullscreenToTheRight); + } if (IS_ENABLED(@"disableFullscreenButton_enabled")) { %init(gHideFullscreenButton); } @@ -1743,7 +1773,7 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide %init(gDisableLiveChatSection); } if (IS_ENABLED(@"YTTapToSeek_enabled")) { - %init(YTTTS_Tweak); + %init(gYTTapToSeek); } if (IS_ENABLED(@"hidePremiumPromos_enabled")) { %init(gHidePremiumPromos); From 5c2f4449789d3e10f8ff9bf1f5b58b135d755bb8 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:33:04 -0500 Subject: [PATCH 12/19] Update youtube-native-share to v0.2.0 YouTube Native Share v0.2.0 Release was helped and contributed by: @arichornloverALT (formerly known as @arichornlover) Additional changes: Fixed Icons being invisible in the App. --- Sources/uYouPlusPatches.xm | 59 +++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/Sources/uYouPlusPatches.xm b/Sources/uYouPlusPatches.xm index 7430664..98b3286 100644 --- a/Sources/uYouPlusPatches.xm +++ b/Sources/uYouPlusPatches.xm @@ -2,6 +2,7 @@ # pragma mark - YouTube patches +/* // Fix Google Sign in by @PoomSmart and @level3tjg (qnblackcat/uYouPlus#684) %hook NSBundle - (NSDictionary *)infoDictionary { @@ -11,6 +12,17 @@ return info; } %end +*/ + +// Workaround for MiRO92/uYou-for-YouTube#12, qnblackcat/uYouPlus#263 +%hook YTDataUtils ++ (NSMutableDictionary *)spamSignalsDictionary { + return nil; +} ++ (NSMutableDictionary *)spamSignalsDictionaryWithoutIDFA { + return nil; +} +%end %hook YTHotConfig - (BOOL)disableAfmaIdfaCollection { return NO; } @@ -98,7 +110,6 @@ static inline NSString* extractIdWithFormat(GPBUnknownFieldSet *fields, NSIntege NSString *id = [[NSString alloc] initWithData:[idField.lengthDelimitedList firstObject] encoding:NSUTF8StringEncoding]; return [NSString stringWithFormat:format, id]; } - static BOOL showNativeShareSheet(NSString *serializedShareEntity) { GPBMessage *shareEntity = [%c(GPBMessage) deserializeFromString:serializedShareEntity]; GPBUnknownFieldSet *fields = shareEntity.unknownFields; @@ -107,7 +118,7 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { if ([fields hasField:ShareEntityFieldClip]) { GPBUnknownField *shareEntityClip = [fields getField:ShareEntityFieldClip]; if ([shareEntityClip.lengthDelimitedList count] != 1) - return FALSE; + return NO; GPBMessage *clipMessage = [%c(GPBMessage) parseFromData:[shareEntityClip.lengthDelimitedList firstObject] error:nil]; shareUrl = extractIdWithFormat(clipMessage.unknownFields, 1, @"https://youtube.com/clip/%@"); } @@ -128,40 +139,32 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { shareUrl = extractIdWithFormat(fields, ShareEntityFieldVideo, @"https://youtube.com/watch?v=%@"); if (!shareUrl) - return FALSE; + return NO; - UIActivityViewController *activityViewController = [[UIActivityViewController alloc]initWithActivityItems:@[shareUrl] applicationActivities:nil]; - [[%c(YTUIUtils) topViewControllerForPresenting] presentViewController:activityViewController animated:YES completion:^{}]; - return TRUE; + UIViewController *topViewController = [%c(YTUIUtils) topViewControllerForPresenting]; + UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[shareUrl] applicationActivities:nil]; + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + [topViewController presentViewController:activityViewController animated:YES completion:^{}]; + } else { + UIPopoverController *popoverController = [[UIPopoverController alloc] initWithContentViewController:activityViewController]; + CGRect rect = CGRectMake(CGRectGetMidX(topViewController.view.bounds), CGRectGetMaxY(topViewController.view.bounds), 0, 0); + [popoverController presentPopoverFromRect:rect inView:topViewController.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + } + return YES; } - /* -------------------- iPad Layout -------------------- */ -/* -%hook YTShareRequestViewController -- (id)initWithService:(id)_service parentResponder:(id)_parentResponder { - id result = %orig; - // disable the default share sheet behavior and force the app to call [YTAccountScopedCommandRouter handleCommand] if available - if ([_parentResponder respondsToSelector:@selector(handleCommand:entry:fromView:sender:completionBlock:)]) { - [_parentResponder handleCommand:nil entry:nil fromView:nil sender:nil completionBlock:nil]; - } - return result; -} -%end -*/ - -%hook YTAccountScopedCommandRouter -- (BOOL)handleCommand:(id)command entry:(id)_entry fromView:(id)_fromView sender:(id)_sender completionBlock:(id)_completionBlock { +%hook YTAccountScopedCommandResponderEvent +- (void)send { GPBExtensionDescriptor *shareEntityEndpointDescriptor = [%c(YTIShareEntityEndpoint) shareEntityEndpoint]; - if (![command hasExtension:shareEntityEndpointDescriptor]) + if (![self.command hasExtension:shareEntityEndpointDescriptor]) return %orig; - YTIShareEntityEndpoint *shareEntityEndpoint = [command getExtension:shareEntityEndpointDescriptor]; - if(!shareEntityEndpoint.hasSerializedShareEntity) + YTIShareEntityEndpoint *shareEntityEndpoint = [self.command getExtension:shareEntityEndpointDescriptor]; + if (!shareEntityEndpoint.hasSerializedShareEntity) return %orig; if (!showNativeShareSheet(shareEntityEndpoint.serializedShareEntity)) return %orig; - return TRUE; } %end @@ -186,6 +189,8 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { } %end +// + // iOS 16 uYou crash fix - @level3tjg: https://github.com/qnblackcat/uYouPlus/pull/224 // %group iOS16 // %hook OBPrivacyLinkButton @@ -340,7 +345,7 @@ static void refreshUYouAppearance() { // Disable uYou's playback speed controls (prevent crash on video playback https://github.com/therealFoxster/uYouPlus/issues/2#issuecomment-1894912963) // [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showPlaybackRate"]; - + // Disable uYou's adblock [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"]; } From 36fa89e688d88afdb70e4911686eb331be0cf805 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:06:30 -0500 Subject: [PATCH 13/19] Update uYouPlusPatches.xm --- Sources/uYouPlusPatches.xm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Sources/uYouPlusPatches.xm b/Sources/uYouPlusPatches.xm index 98b3286..f6897ff 100644 --- a/Sources/uYouPlusPatches.xm +++ b/Sources/uYouPlusPatches.xm @@ -141,15 +141,17 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { if (!shareUrl) return NO; - UIViewController *topViewController = [%c(YTUIUtils) topViewControllerForPresenting]; UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[shareUrl] applicationActivities:nil]; - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { - [topViewController presentViewController:activityViewController animated:YES completion:^{}]; - } else { - UIPopoverController *popoverController = [[UIPopoverController alloc] initWithContentViewController:activityViewController]; - CGRect rect = CGRectMake(CGRectGetMidX(topViewController.view.bounds), CGRectGetMaxY(topViewController.view.bounds), 0, 0); - [popoverController presentPopoverFromRect:rect inView:topViewController.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + activityViewController.excludedActivityTypes = @[UIActivityTypeAssignToContact, UIActivityTypePrint]; + + UIViewController *topViewController = [%c(YTUIUtils) topViewControllerForPresenting]; + + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { + activityViewController.popoverPresentationController.sourceView = topViewController.view; } + + [topViewController presentViewController:activityViewController animated:YES completion:nil]; + return YES; } From 6433ce18269c8b09ff66ca62efc5f2477b56076f Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:20:30 -0500 Subject: [PATCH 14/19] Remove deprecated code (uYouPlusSettings.xm) --- Sources/uYouPlusSettings.xm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index 0c985e0..76dd5c5 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -470,7 +470,7 @@ extern NSBundle *uYouPlusBundle(); LOC(@"HIDE_FULLSCREEN_ACTION_BUTTONS_DESC"), @"hideFullscreenActions_enabled", ({ - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { // Show alert if the option is not compatible with iPad UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"iPad Compatibility Issue" message:@"This option is only compatible with iPhone devices." preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; From 829b0c7d6bad029369770a598afd4d7a46bce896 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:02:22 -0500 Subject: [PATCH 15/19] Update uYouPlusPatches.xm --- Sources/uYouPlusPatches.xm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Sources/uYouPlusPatches.xm b/Sources/uYouPlusPatches.xm index f6897ff..24bae43 100644 --- a/Sources/uYouPlusPatches.xm +++ b/Sources/uYouPlusPatches.xm @@ -146,12 +146,16 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { UIViewController *topViewController = [%c(YTUIUtils) topViewControllerForPresenting]; - if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { + if (activityViewController.popoverPresentationController) { activityViewController.popoverPresentationController.sourceView = topViewController.view; + + CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; + CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height; + + activityViewController.popoverPresentationController.sourceRect = CGRectMake(screenWidth / 2.0, screenHeight, 0, 0); + activityViewController.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionAny; } - [topViewController presentViewController:activityViewController animated:YES completion:nil]; - return YES; } @@ -347,7 +351,6 @@ static void refreshUYouAppearance() { // Disable uYou's playback speed controls (prevent crash on video playback https://github.com/therealFoxster/uYouPlus/issues/2#issuecomment-1894912963) // [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showPlaybackRate"]; - // Disable uYou's adblock [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"]; } From 1b3a422a6161323916eb4322f112b7a3a55bb66d Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sun, 14 Jul 2024 08:50:48 -0500 Subject: [PATCH 16/19] Update uYouPlusPatches.xm --- Sources/uYouPlusPatches.xm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Sources/uYouPlusPatches.xm b/Sources/uYouPlusPatches.xm index 24bae43..7540250 100644 --- a/Sources/uYouPlusPatches.xm +++ b/Sources/uYouPlusPatches.xm @@ -110,7 +110,7 @@ static inline NSString* extractIdWithFormat(GPBUnknownFieldSet *fields, NSIntege NSString *id = [[NSString alloc] initWithData:[idField.lengthDelimitedList firstObject] encoding:NSUTF8StringEncoding]; return [NSString stringWithFormat:format, id]; } -static BOOL showNativeShareSheet(NSString *serializedShareEntity) { +static BOOL showNativeShareSheet(NSString *serializedShareEntity, UIView *sourceView) { GPBMessage *shareEntity = [%c(GPBMessage) deserializeFromString:serializedShareEntity]; GPBUnknownFieldSet *fields = shareEntity.unknownFields; NSString *shareUrl; @@ -148,14 +148,11 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { if (activityViewController.popoverPresentationController) { activityViewController.popoverPresentationController.sourceView = topViewController.view; - - CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; - CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height; - - activityViewController.popoverPresentationController.sourceRect = CGRectMake(screenWidth / 2.0, screenHeight, 0, 0); - activityViewController.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionAny; + activityViewController.popoverPresentationController.sourceRect = [sourceView convertRect:sourceView.bounds toView:topViewController.view]; } + [topViewController presentViewController:activityViewController animated:YES completion:nil]; + return YES; } @@ -169,7 +166,7 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { YTIShareEntityEndpoint *shareEntityEndpoint = [self.command getExtension:shareEntityEndpointDescriptor]; if (!shareEntityEndpoint.hasSerializedShareEntity) return %orig; - if (!showNativeShareSheet(shareEntityEndpoint.serializedShareEntity)) + if (!showNativeShareSheet(shareEntityEndpoint.serializedShareEntity, self.fromView)) return %orig; } %end @@ -177,7 +174,7 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { /* ------------------- iPhone Layout ------------------- */ %hook ELMPBShowActionSheetCommand -- (void)executeWithCommandContext:(id)_context handler:(id)_handler { +- (void)executeWithCommandContext:(ELMCommandContext*)context handler:(id)_handler { if (!self.hasOnAppear) return %orig; GPBExtensionDescriptor *innertubeCommandDescriptor = [%c(YTIInnertubeCommandExtensionRoot) innertubeCommand]; @@ -190,7 +187,7 @@ static BOOL showNativeShareSheet(NSString *serializedShareEntity) { YTIUpdateShareSheetCommand *updateShareSheetCommand = [innertubeCommand getExtension:updateShareSheetCommandDescriptor]; if (!updateShareSheetCommand.hasSerializedShareEntity) return %orig; - if (!showNativeShareSheet(updateShareSheetCommand.serializedShareEntity)) + if (!showNativeShareSheet(updateShareSheetCommand.serializedShareEntity, context.context.fromView)) return %orig; } %end @@ -351,6 +348,4 @@ static void refreshUYouAppearance() { // Disable uYou's playback speed controls (prevent crash on video playback https://github.com/therealFoxster/uYouPlus/issues/2#issuecomment-1894912963) // [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showPlaybackRate"]; - // Disable uYou's adblock - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"removeYouTubeAds"]; } From 3c4441030f3b4c37d05fdea7bd7d2c19a89d4d79 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:42:13 -0500 Subject: [PATCH 17/19] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0344d6a..d81b76c 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ MODULES = jailed endif ifndef YOUTUBE_VERSION -YOUTUBE_VERSION = 19.23.3 +YOUTUBE_VERSION = 19.28.1 endif ifndef UYOU_VERSION UYOU_VERSION = 3.0.4 From 2ecb12f80c791ed4391a5c228b049d0075cf93cb Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:45:07 -0500 Subject: [PATCH 18/19] Update buildapp.yml compiling --- .github/workflows/buildapp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildapp.yml b/.github/workflows/buildapp.yml index da22006..224a281 100644 --- a/.github/workflows/buildapp.yml +++ b/.github/workflows/buildapp.yml @@ -151,7 +151,7 @@ jobs: - name: Upload Artifact if: ${{ inputs.upload_artifact }} - uses: actions/upload-artifact@v4.3.3 + uses: actions/upload-artifact@v4.3.4 env: UYOU_VERSION: ${{ inputs.uyou_version }} YOUTUBE_VERSION: ${{ steps.prepare_youtube.outputs.youtube_version }} From 755dde6cd1d960a575f7f98248d7c6148b78c4b2 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:49:40 -0500 Subject: [PATCH 19/19] New uYouPlusPatches.h Headers Fixes compiling errors. These changes were ported from arichornloverALT/uYouEnhanced --- Sources/uYouPlusPatches.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sources/uYouPlusPatches.h b/Sources/uYouPlusPatches.h index e9b74f6..0e65c38 100644 --- a/Sources/uYouPlusPatches.h +++ b/Sources/uYouPlusPatches.h @@ -1,5 +1,6 @@ #import #import +#import #import #import #import "Tweaks/protobuf/objectivec/GPBDescriptor.h" @@ -75,6 +76,14 @@ @property (nonatomic, assign, readwrite) BOOL hasOnAppear; @end +@interface ELMContext : NSObject +@property (nonatomic, strong, readwrite) UIView *fromView; +@end + +@interface ELMCommandContext : NSObject +@property (nonatomic, strong, readwrite) ELMContext *context; +@end + @interface YTIUpdateShareSheetCommand @property (nonatomic, assign, readwrite) BOOL hasSerializedShareEntity; @property (nonatomic, copy, readwrite) NSString *serializedShareEntity; @@ -87,6 +96,7 @@ @interface YTAccountScopedCommandResponderEvent @property (nonatomic, strong, readwrite) YTICommand *command; +@property (nonatomic, strong, readwrite) UIView *fromView; @end @interface YTIShareEntityEndpoint