Shim.xm 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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 UITextField
  48. -(void)setTextContentType:(id)arg1 {
  49. %log;
  50. @try {
  51. %orig;
  52. } @catch (NSException *exception) {
  53. HBLogInfo(@"exception: %@", exception);
  54. }
  55. }
  56. %end
  57. %hook UIView
  58. %new - (BOOL)insetsLayoutMarginsFromSafeArea {
  59. %log;
  60. return NO;
  61. }
  62. %new - (void)setInsetsLayoutMarginsFromSafeArea:(BOOL)value
  63. {
  64. %log;
  65. }
  66. %end
  67. %hook UIFocusAnimationCoordinator
  68. //-[UIFocusAnimationCoordinator addCoordinatedUnfocusingAnimations:completion:]:
  69. %new - (void)addCoordinatedUnfocusingAnimations:(id)animations
  70. completion:(id)completion
  71. {
  72. %log;
  73. }
  74. %end
  75. %hook UITableView
  76. //[UITableView setInsetsContentViewsToSafeArea:]:
  77. %new - (void)setInsetsContentViewsToSafeArea:(BOOL)value
  78. {
  79. %log;
  80. }
  81. %new - (BOOL)insetsContentViewsToSafeArea
  82. {
  83. %log;
  84. return NO;
  85. }
  86. %end
  87. //hulu
  88. //#import <CoreGraphics/CoreGraphics.h>
  89. //#import <UIKit/UIKit.h>
  90. %hook UIStackView
  91. // -[UIStackView setCustomSpacing:afterView:]:
  92. %new
  93. - (void)setCustomSpacing:(int)spacing afterView:(id)arrangedSubview
  94. {
  95. %log;
  96. return;
  97. }
  98. %end
  99. %hook NSDictionary
  100. %new
  101. - (NSDictionary *)initWithContentsOfURL:(NSURL *)url error:(NSError **)error
  102. {
  103. //hull open crash fix
  104. %log;
  105. return [[NSDictionary alloc] initWithContentsOfURL:url];
  106. }
  107. %end
  108. //all the ones in here are for prime
  109. %hook AVPlayerViewController
  110. %new
  111. - (void)setPlaybackControlsIncludeInfoViews:(BOOL)value
  112. {
  113. %log;
  114. NSLog(@"im going from ashy, to classy");
  115. }
  116. %new
  117. - (BOOL)playbackControlsIncludeInfoViews
  118. {
  119. return NO;
  120. }
  121. %new
  122. - (void)setPlaybackControlsIncludeTransportBar:(BOOL)value
  123. {
  124. %log;
  125. NSLog(@"optimus prime bitch");
  126. }
  127. %new
  128. - (BOOL)playbackControlsIncludeTransportBar
  129. {
  130. %log;
  131. return NO;
  132. }
  133. %end