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 }} 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 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 diff --git a/Sources/uYouPlus.h b/Sources/uYouPlus.h index bf8c680..779c5f8 100644 --- a/Sources/uYouPlus.h +++ b/Sources/uYouPlus.h @@ -1,53 +1,56 @@ #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 // Fixes uYou crash when trying to play video (#1422) - -// Hide buttons under the video player by @PoomSmart +#import +#import #import #import -#import - -// YouTube-X -#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 +#import "uYouPlusThemes.h" // uYouPlus Themes #define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil] #define IS_ENABLED(k) [[NSUserDefaults standardUserDefaults] boolForKey:k] @@ -58,12 +61,8 @@ #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 -@interface YTInlinePlayerBarContainerView (uYouEnhanced) -@property(nonatomic, assign) BOOL shouldDisplayTimeRemaining; -@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 @interface SSOConfiguration : NSObject @@ -85,12 +84,10 @@ // Hide Home Tab - @bhackel @interface YTPivotBarItemViewAccessibilityControl : UIControl @end -@interface YTPivotBarItemView (uYouEnhanced) -@property (nonatomic, strong) YTPivotBarItemViewAccessibilityControl *hitTarget; -@end +// YTPivotBarItemView Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTPivotBarItemView.h // YTTapToSeek - https://github.com/bhackel/YTTapToSeek -// Header has been moved to https://github.com/arichornlover/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h +// YTMainAppVideoPlayerOverlayViewController Header has been moved to https://github.com/arichornloverALT/YouTubeHeader/blob/main/YTMainAppVideoPlayerOverlayViewController.h // Enable Premium logo - @bhackel @interface YTITopbarLogoRenderer : NSObject @@ -98,36 +95,12 @@ @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 -@interface YTIItemSectionSupportedRenderers (uYouEnhanced) -@property(readonly, nonatomic) YTICompactLinkRenderer *compactLinkRenderer; -@property(readonly, nonatomic) YTICompactListItemRenderer *compactListItemRenderer; -- (BOOL)hasCompactLinkRenderer; -- (BOOL)hasCompactListItemRenderer; -@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; @end @@ -136,13 +109,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; +// 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) - (UIInterfaceOrientationMask) supportedInterfaceOrientations; - (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation; - (void)forceRightFullscreenOrientation; @@ -195,17 +165,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 @@ -220,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; 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); diff --git a/Sources/uYouPlusPatches.h b/Sources/uYouPlusPatches.h index 6dcac73..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; @@ -85,6 +94,11 @@ + (GPBExtensionDescriptor*)innertubeCommand; @end +@interface YTAccountScopedCommandResponderEvent +@property (nonatomic, strong, readwrite) YTICommand *command; +@property (nonatomic, strong, readwrite) UIView *fromView; +@end + @interface YTIShareEntityEndpoint @property (nonatomic, assign, readwrite) BOOL hasSerializedShareEntity; @property (nonatomic, copy, readwrite) NSString *serializedShareEntity; diff --git a/Sources/uYouPlusPatches.xm b/Sources/uYouPlusPatches.xm index 7430664..7540250 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,8 +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; @@ -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,47 +139,42 @@ 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; + UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[shareUrl] applicationActivities:nil]; + activityViewController.excludedActivityTypes = @[UIActivityTypeAssignToContact, UIActivityTypePrint]; + + UIViewController *topViewController = [%c(YTUIUtils) topViewControllerForPresenting]; + + if (activityViewController.popoverPresentationController) { + activityViewController.popoverPresentationController.sourceView = topViewController.view; + activityViewController.popoverPresentationController.sourceRect = [sourceView convertRect:sourceView.bounds toView:topViewController.view]; + } + + [topViewController presentViewController:activityViewController animated:YES completion:nil]; + + 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)) + if (!showNativeShareSheet(shareEntityEndpoint.serializedShareEntity, self.fromView)) return %orig; - return TRUE; } %end /* ------------------- 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]; @@ -181,11 +187,13 @@ 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 +// + // iOS 16 uYou crash fix - @level3tjg: https://github.com/qnblackcat/uYouPlus/pull/224 // %group iOS16 // %hook OBPrivacyLinkButton @@ -340,7 +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"]; } 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];