mirror of
https://github.com/NohamR/Tweaks.git
synced 2026-07-11 22:41:44 +00:00
97 lines
2.4 KiB
Plaintext
97 lines
2.4 KiB
Plaintext
// changes : FCInAppPurchaseServiceFreemium block deleted, FCTraktIAPManager block deleted, layoutSubviews -> awakeFromNib on FCVersionView, and the dead return %orig lines after return statements cleaned up (they were unreachable in the old version too)
|
|
|
|
#import <substrate.h>
|
|
#import <Foundation/Foundation.h>
|
|
#import <UIKit/UIKit.h>
|
|
|
|
%hook FCIAPGUIHelper
|
|
+(bool) isProAvailable {
|
|
return TRUE;
|
|
}
|
|
+(bool) isSubscriptionBought {
|
|
return TRUE;
|
|
}
|
|
%end
|
|
|
|
%hook FCInAppPurchaseServiceBase
|
|
- (bool)isFeaturePurchased:(long long)arg1 tillDate:(id*)arg2 {
|
|
return 1;
|
|
}
|
|
- (bool)isFeaturePurchased:(long long)arg1 {
|
|
return 1;
|
|
}
|
|
%end
|
|
|
|
%hook FCInAppPurchaseServiceDummy
|
|
- (bool)isFeaturePurchased:(long long)arg1 tillDate:(id*)arg2 {
|
|
return 1;
|
|
}
|
|
%end
|
|
|
|
// REMOVED: FCInAppPurchaseServiceFreemium (class gone from binary, replaced by SK2)
|
|
|
|
// SK2 IAP backend
|
|
%hook _TtC6infuse31InAppPurchaseServiceFreemiumSK2
|
|
- (bool)isFeaturePurchased:(long long)arg1 tillDate:(id*)arg2 {
|
|
return 1;
|
|
}
|
|
- (long long)iapVersionStatus {
|
|
// FCUpgradeToProViewController.featureHasBought checks iapVersionStatus > 0
|
|
return 1;
|
|
}
|
|
%end
|
|
|
|
%hook FCProductCollectionCell
|
|
-(bool) featurePurchased {
|
|
return TRUE;
|
|
}
|
|
%end
|
|
|
|
// REMOVED: FCTraktIAPManager (class gone from binary)
|
|
|
|
%hook FCUpgradeToProViewController
|
|
-(bool) featureHasBought {
|
|
return TRUE;
|
|
}
|
|
%end
|
|
|
|
// Add credits
|
|
@interface FCTVSettingsController : UITableViewController
|
|
- (UITableView *)tableView;
|
|
@end
|
|
|
|
%hook FCTVSettingsController
|
|
- (void)setUpAppVersionLabel {
|
|
%orig;
|
|
|
|
UITableView *tv = [self tableView];
|
|
UILabel *footer = (UILabel *)tv.tableFooterView;
|
|
|
|
// Guard: footer is nil/not a UILabel
|
|
if (![footer isKindOfClass:[UILabel class]]) return;
|
|
|
|
NSAttributedString *current = footer.attributedText;
|
|
if (!current.length) return;
|
|
|
|
// Handles repeated calls
|
|
if ([current.string hasPrefix:@"Infuse Team •"]) return;
|
|
|
|
NSDictionary *attrs = [current attributesAtIndex:0 effectiveRange:nil];
|
|
NSMutableAttributedString *mas = [current mutableCopy];
|
|
NSAttributedString *prefix = [[NSAttributedString alloc]
|
|
initWithString:@"Infuse Team • "
|
|
attributes:attrs];
|
|
[mas insertAttributedString:prefix atIndex:0];
|
|
footer.attributedText = mas;
|
|
}
|
|
%end
|
|
|
|
// iOS 16 Crash Fix
|
|
%hook CKContainer
|
|
+ (id)defaultContainer {
|
|
return nil;
|
|
}
|
|
+ (id)containerWithIdentifier:(id)arg1 {
|
|
return nil;
|
|
}
|
|
%end |