Skip to content

Commit

Permalink
Fixed search in app list, added app id as subtitle in app list and en…
Browse files Browse the repository at this point in the history
…able searching by app id, added new internal apps to restricted list, updated code for iOS 13.0 & 13.1
  • Loading branch information
tomaszpoliszuk committed May 11, 2021
1 parent 1e5e5b8 commit fbb7979
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions HomeScreenQuickActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static NSString *const domainString = @"com.tomaszpoliszuk.homescreenquickaction
@interface SBIconView : UIView
@property (nonatomic, retain) SBIcon *icon;
@property (nonatomic, retain) SBFolderIcon *folderIcon;
@property (nonatomic, readonly, copy) NSString *applicationBundleIdentifier;
@property (nonatomic, readonly, copy) NSString *applicationBundleIdentifierForShortcuts;
- (bool)isFolderIcon;
- (long long)displayedLabelAccessoryType;
Expand Down
8 changes: 5 additions & 3 deletions HomeScreenQuickActions.xm
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,13 @@ static void ClearDirectoryURLContents(NSURL *url) {
%hook SBIconView
- (void)setApplicationShortcutItems:(NSArray *)arg1 {
NSString* bundleId;
if([self respondsToSelector:@selector(applicationBundleIdentifierForShortcuts)]) {
if( [self respondsToSelector:@selector(applicationBundleIdentifier)] ) {
bundleId = [self applicationBundleIdentifier];
} else if( [self respondsToSelector:@selector(applicationBundleIdentifierForShortcuts)] ) {
bundleId = [self applicationBundleIdentifierForShortcuts];
}
NSString* applicationBundleID;
if([[self icon] respondsToSelector:@selector(applicationBundleID)]) {
if( [[self icon] respondsToSelector:@selector(applicationBundleID)] ) {
applicationBundleID = [[self icon] applicationBundleID];
}
if ( enableTweak ) {
Expand Down Expand Up @@ -1272,7 +1274,7 @@ static void ClearDirectoryURLContents(NSURL *url) {
[currentAlertWindow.rootViewController presentViewController:currentAlert animated:YES completion:nil];
}
return NO;
} else if ( [self respondsToSelector:@selector(applicationBundleIdentifierForShortcuts)] && [[arg1 type] isEqualToString:@"com.tomaszpoliszuk.springboardhome.application-shortcut-item.open-app-in-filza"] ) {
} else if ( ( [self respondsToSelector:@selector(applicationBundleIdentifier)] || [self respondsToSelector:@selector(applicationBundleIdentifierForShortcuts)] ) && [[arg1 type] isEqualToString:@"com.tomaszpoliszuk.springboardhome.application-shortcut-item.open-app-in-filza"] ) {
LSApplicationProxy *applicationProxy = [%c(LSApplicationProxy) applicationProxyForIdentifier:applicationBundleID];
// appStoreReceiptURL -> opens application app store receipt folder (StoreKit)
// bundleContainerURL -> opens applications container and selects application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ - (NSArray *)specifiers {
PSSpecifier *specifier = [PSSpecifier preferenceSpecifierNamed:title target:self set:@selector(setPreferenceValue:specifier:) get:@selector(readPreferenceValue:) detail:nil cell:PSSwitchCell edit:nil];
[specifier setProperty:defaultIcon forKey:@"iconImage"];
[specifier setProperty:applicationProxy.applicationIdentifier forKey:@"appBundleID"];
[specifier setProperty:NSClassFromString(@"PSSubtitleSwitchTableCell") forKey:@"cellClass"];
[specifier setProperty:applicationProxy.applicationIdentifier forKey:@"cellSubtitleText"];
[specifier setProperty:@"com.tomaszpoliszuk.homescreenquickactions" forKey:@"defaults"];
[specifier setProperty:@"1" forKey:@"default"];
[specifier setProperty:@"com.tomaszpoliszuk.homescreenquickactions.settingschanged" forKey:@"PostNotification"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ - (void)updateSearchResultsWithText:(NSString *)text {
return;
}
NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(PSSpecifier *specifier, NSDictionary *bindings) {
if ( specifier.cellType == PSGroupCell ) {
return [specifier.name.lowercaseString rangeOfString:text.lowercaseString].location != NSNotFound;
} else {
return YES;
if ( specifier.cellType != PSGroupCell ) {
NSString *appName = specifier.name;
NSString *appID = [specifier.properties objectForKey:@"cellSubtitleText"];
return ( ( [appName.lowercaseString rangeOfString:text.lowercaseString].location != NSNotFound ) || ( [appID.lowercaseString rangeOfString:text.lowercaseString].location != NSNotFound ) );
}
return YES;
}];
NSMutableArray *_specifiersFiltered = [NSMutableArray new];
[_specifiersFiltered addObjectsFromArray:self.specifiersInstalledSystemGroup];
Expand Down
4 changes: 4 additions & 0 deletions HomeScreenQuickActionsSettings/Resources/InternalApps.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
"com.apple.ActivityMessagesApp",
"com.apple.AdPlatformsDiagnostics",
"com.apple.AdSheetPhone",
"com.apple.AMSEngagementViewService",
"com.apple.Animoji.StickersApp",
"com.apple.appleaccount.AACredentialRecoveryDialog",
"com.apple.AppSSOUIService",
"com.apple.AskPermissionUI",
"com.apple.AuthenticationServicesUI",
"com.apple.AuthKitUIService",
"com.apple.AXUIViewService",
"com.apple.BarcodeScanner",
Expand Down Expand Up @@ -49,6 +51,7 @@
"com.apple.Home.HomeUIService",
"com.apple.iad.iAdOptOut",
"com.apple.icloud.apps.messages.business",
"com.apple.icloud.FindMyDevice.FindMyExtensionContainer",
"com.apple.icloud.spnfcurl",
"com.apple.icq",
"com.apple.iMessageAppsViewService",
Expand All @@ -64,6 +67,7 @@
"com.apple.MusicUIService",
"com.apple.nike",
"com.apple.Passbook",
"com.apple.PassbookBanner",
"com.apple.PassbookSecureUIService",
"com.apple.PassbookStub",
"com.apple.PassbookUIService",
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: com.tomaszpoliszuk.homescreenquickactions
Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader
Name: Home Screen Quick Actions
Version: 1.6.3
Version: 1.6.4
Architecture: iphoneos-arm
Description: Control Home Screen Quick Actions on your device
Homepage: http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=homescreenquickactionsDp
Expand Down

0 comments on commit fbb7979

Please sign in to comment.