Shim.xm 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. #import <UIKit/UIKit.h>
  2. %hook SCORHelper
  3. + (BOOL)deviceIsJailBroken
  4. {
  5. %log;
  6. return NO;
  7. }
  8. %end
  9. %hook UIImageView
  10. %new - (id)overlayContentView
  11. {
  12. %log;
  13. UIView *theView = [UIView new];
  14. [self addSubview:theView];
  15. return theView;
  16. //return nil;
  17. }
  18. %end
  19. %hook UIScrollView
  20. %new
  21. -(void)setContentInsetAdjustmentBehavior:(int)value {
  22. HBLogInfo(@"netfixed bitch");
  23. NSLog(@"netfixed bitch");
  24. return;
  25. }
  26. %new
  27. -(NSInteger)contentInsetAdjustmentBehavior {
  28. NSLog(@"netfixed bitch");
  29. HBLogInfo(@"netfixed bitch");
  30. return 0;
  31. }
  32. %end
  33. %hook UICollectionView
  34. %new
  35. -(void)setContentInsetAdjustmentBehavior:(int)value {
  36. NSLog(@"netfixed bitch");
  37. HBLogInfo(@"netfixed bitch");
  38. return;
  39. }
  40. %new
  41. -(NSInteger)contentInsetAdjustmentBehavior {
  42. NSLog(@"netfixed bitch");
  43. HBLogInfo(@"netfixed bitch");
  44. return 0;
  45. }
  46. %end
  47. %hook UIView
  48. %new - (BOOL)insetsLayoutMarginsFromSafeArea {
  49. %log;
  50. return NO;
  51. }
  52. %new - (void)setInsetsLayoutMarginsFromSafeArea:(BOOL)value
  53. {
  54. %log;
  55. }
  56. %end
  57. %hook UIFocusAnimationCoordinator
  58. //-[UIFocusAnimationCoordinator addCoordinatedUnfocusingAnimations:completion:]:
  59. %new - (void)addCoordinatedUnfocusingAnimations:(id)animations
  60. completion:(id)completion
  61. {
  62. %log;
  63. }
  64. %end
  65. %hook UITableView
  66. //[UITableView setInsetsContentViewsToSafeArea:]:
  67. %new - (void)setInsetsContentViewsToSafeArea:(BOOL)value
  68. {
  69. %log;
  70. }
  71. %new - (BOOL)insetsContentViewsToSafeArea
  72. {
  73. %log;
  74. return NO;
  75. }
  76. %end
  77. //hulu
  78. //#import <CoreGraphics/CoreGraphics.h>
  79. //#import <UIKit/UIKit.h>
  80. %hook UIStackView
  81. // -[UIStackView setCustomSpacing:afterView:]:
  82. %new
  83. - (void)setCustomSpacing:(int)spacing afterView:(id)arrangedSubview
  84. {
  85. %log;
  86. return;
  87. }
  88. %end
  89. %hook NSDictionary
  90. %new
  91. - (NSDictionary *)initWithContentsOfURL:(NSURL *)url error:(NSError **)error
  92. {
  93. //hull open crash fix
  94. %log;
  95. return [[NSDictionary alloc] initWithContentsOfURL:url];
  96. }
  97. %end
  98. //all the ones in here are for prime
  99. %hook AVPlayerViewController
  100. %new
  101. - (void)setPlaybackControlsIncludeInfoViews:(BOOL)value
  102. {
  103. %log;
  104. NSLog(@"im going from ashy, to classy");
  105. }
  106. %new
  107. - (BOOL)playbackControlsIncludeInfoViews
  108. {
  109. return NO;
  110. }
  111. %new
  112. - (void)setPlaybackControlsIncludeTransportBar:(BOOL)value
  113. {
  114. %log;
  115. NSLog(@"optimus prime bitch");
  116. }
  117. %new
  118. - (BOOL)playbackControlsIncludeTransportBar
  119. {
  120. %log;
  121. return NO;
  122. }
  123. %end