88
99
1010#import " Interfaces.h"
11+ #import < rootless.h>
1112
1213BOOL initialized = NO ;
1314id manager = nil ;
@@ -25,6 +26,7 @@ inline bool isLikelyUIProcess() {
2526
2627 return [executablePath hasPrefix: @" /var/containers/Bundle/Application" ] ||
2728 [executablePath hasPrefix: @" /Applications" ] ||
29+ [executablePath containsString: @" /procursus/Applications" ] ||
2830 [executablePath hasSuffix: @" CoreServices/SpringBoard.app/SpringBoard" ];
2931}
3032
@@ -38,8 +40,8 @@ inline BOOL flexAlreadyLoaded() {
3840}
3941
4042%ctor {
41- NSString *standardPath = @" /Library/MobileSubstrate/DynamicLibraries/libFLEX.dylib" ;
42- NSString *reflexPath = @" /Library/MobileSubstrate/DynamicLibraries/libreflex.dylib" ;
43+ NSString *standardPath = ROOT_PATH_NS ( @" /Library/MobileSubstrate/DynamicLibraries/libFLEX.dylib" ) ;
44+ NSString *reflexPath = ROOT_PATH_NS ( @" /Library/MobileSubstrate/DynamicLibraries/libreflex.dylib" ) ;
4345 NSFileManager *disk = NSFileManager .defaultManager ;
4446 NSString *libflex = nil ;
4547 NSString *libreflex = nil ;
@@ -149,7 +151,11 @@ inline BOOL flexAlreadyLoaded() {
149151 self = %orig ;
150152 if ([present isKindOfClass: %c (FLEXNavigationController)]) {
151153 // Enable half height sheet
152- self._presentsAtStandardHalfHeight = YES ;
154+ if ([self respondsToSelector: @selector (_presentsAtStandardHalfHeight )]) {
155+ self._presentsAtStandardHalfHeight = YES ;
156+ } else {
157+ self._detents = @[[%c (_UISheetDetent) _mediumDetent ], [%c (_UISheetDetent) _largeDetent ]];
158+ }
153159 // Start fullscreen, 0 for half height
154160 self._indexOfCurrentDetent = 1 ;
155161 // Don't expand unless dragged up
0 commit comments