├── anyspot9.plist ├── settings.png ├── settings@2x.png ├── anyspotpreferences ├── icon.png ├── icon@2x.png ├── settings.png ├── settings@2x.png ├── Resources │ ├── icon.png │ ├── icon@2x.png │ ├── settings.png │ ├── settings@2x.png │ ├── Info.plist │ ├── AnySpotAdvanced.plist │ └── Root.plist ├── AnySpotRootListController.h ├── AnySpotAdvancedListController.h ├── layout │ └── Library │ │ ├── Application Support │ │ └── AnySpot │ │ │ └── assets │ │ │ ├── icon.png │ │ │ ├── link.png │ │ │ ├── user.png │ │ │ ├── Recent2.png │ │ │ ├── bitcoin.png │ │ │ ├── github.png │ │ │ ├── icon@2x.png │ │ │ ├── link@2x.png │ │ │ ├── paypal.png │ │ │ ├── twitter.png │ │ │ ├── user@2x.png │ │ │ ├── Recent2@2x.png │ │ │ ├── bitcoin@2x.png │ │ │ ├── github@2x.png │ │ │ ├── paypal@2x.png │ │ │ ├── services.png │ │ │ ├── twitter@2x.png │ │ │ └── services@2x.png │ │ └── Activator │ │ └── Listeners │ │ └── org.thebigboss.anyspot9 │ │ ├── icon-small.png │ │ └── icon-small@2x.png ├── AnySpotAdvancedListController.m ├── entry.plist ├── Makefile └── AnySpotRootListController.m ├── AnySpotSnapshotView.m ├── AnySpot9.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── zac.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcuserdata │ └── zac.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── xcshareddata │ └── xcschemes │ │ ├── theos.xcscheme │ │ ├── theos do.xcscheme │ │ └── theos release.xcscheme └── project.pbxproj ├── AnySpotController.h ├── AnySpotSnapshotView.h ├── control ├── Makefile ├── AnySpotActivator.h ├── README.md ├── AnySpotHeaders.h ├── Testing.xm ├── LAListener.h └── Tweak.xm /anyspot9.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/settings.png -------------------------------------------------------------------------------- /settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/settings@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/icon.png -------------------------------------------------------------------------------- /anyspotpreferences/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/icon@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/settings.png -------------------------------------------------------------------------------- /anyspotpreferences/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/settings@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/Resources/icon.png -------------------------------------------------------------------------------- /anyspotpreferences/Resources/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/Resources/icon@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/Resources/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/Resources/settings.png -------------------------------------------------------------------------------- /anyspotpreferences/Resources/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/Resources/settings@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/AnySpotRootListController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AnySpotRootListController : PSListController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /anyspotpreferences/AnySpotAdvancedListController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AnySpotAdvancedListController : PSListController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /AnySpotSnapshotView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnySpotSnapshotView.m 3 | // AnySpot9 4 | // 5 | // Created by twodayslate on 11/15/15. 6 | // 7 | // 8 | 9 | #import 10 | -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/icon.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/link.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/user.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/Recent2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/Recent2.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/bitcoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/bitcoin.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/github.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/icon@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/link@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/link@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/paypal.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/twitter.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/user@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/user@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/Recent2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/Recent2@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/bitcoin@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/bitcoin@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/github@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/github@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/paypal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/paypal@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/services.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/twitter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/twitter@2x.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Application Support/AnySpot/assets/services@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Application Support/AnySpot/assets/services@2x.png -------------------------------------------------------------------------------- /AnySpot9.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Activator/Listeners/org.thebigboss.anyspot9/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Activator/Listeners/org.thebigboss.anyspot9/icon-small.png -------------------------------------------------------------------------------- /anyspotpreferences/layout/Library/Activator/Listeners/org.thebigboss.anyspot9/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/anyspotpreferences/layout/Library/Activator/Listeners/org.thebigboss.anyspot9/icon-small@2x.png -------------------------------------------------------------------------------- /AnySpot9.xcodeproj/project.xcworkspace/xcuserdata/zac.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twodayslate/AnySpot-for-iOS-9/master/AnySpot9.xcodeproj/project.xcworkspace/xcuserdata/zac.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AnySpotController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnySpotController.h 3 | // AnySpot9 4 | // 5 | // Created by twodayslate on 11/29/15. 6 | // 7 | // 8 | 9 | #ifndef AnySpotController_h 10 | #define AnySpotController_h 11 | 12 | 13 | #endif /* AnySpotController_h */ 14 | -------------------------------------------------------------------------------- /AnySpotSnapshotView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnySpotSnapshotView.h 3 | // AnySpot9 4 | // 5 | // Created by twodayslate on 11/15/15. 6 | // 7 | // 8 | 9 | #ifndef AnySpotSnapshotView_h 10 | #define AnySpotSnapshotView_h 11 | 12 | 13 | #endif /* AnySpotSnapshotView_h */ 14 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: org.thebigboss.anyspot9 2 | Name: AnySpot9 3 | Depends: mobilesubstrate 4 | Version: 0.0.3 5 | Architecture: iphoneos-arm 6 | Description: Launch Spotlight from anywhere! 7 | Maintainer: twodayslate 8 | Author: twodayslate 9 | Section: Tweaks 10 | Icon: file:///Library/PreferenceBundles/anyspotpreferences.bundle/icon.png 11 | -------------------------------------------------------------------------------- /anyspotpreferences/AnySpotAdvancedListController.m: -------------------------------------------------------------------------------- 1 | #include "AnySpotAdvancedListController.h" 2 | 3 | @implementation AnySpotAdvancedListController 4 | 5 | - (NSArray *)specifiers { 6 | if (!_specifiers) { 7 | // Grab the Root.plist file from Resources/Root.plist and present that stuff 8 | _specifiers = [[self loadSpecifiersFromPlistName:@"AnySpotAdvanced" target:self] retain]; 9 | } 10 | 11 | return _specifiers; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | THEOS_DEVICE_IP = 127.0.0.1 2 | THEOS_DEVICE_PORT = 2222 3 | 4 | include /opt/theos/makefiles/common.mk 5 | 6 | TWEAK_NAME = AnySpot9 7 | AnySpot9_FILES = Tweak.xm Testing.xm 8 | AnySpot9_FRAMEWORKS = UIKit 9 | 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | 12 | SUBPROJECTS += AnySpotPreferences 13 | 14 | include $(THEOS_MAKE_PATH)/aggregate.mk 15 | 16 | after-install:: 17 | install.exec "killall -9 SpringBoard" 18 | SUBPROJECTS += anyspotpreferences 19 | include $(THEOS_MAKE_PATH)/aggregate.mk 20 | -------------------------------------------------------------------------------- /anyspotpreferences/entry.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | AnySpotPreferences 9 | cell 10 | PSLinkCell 11 | detail 12 | AnySpotRootListController 13 | icon 14 | icon.png 15 | isController 16 | 17 | label 18 | AnySpot 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AnySpotActivator.h: -------------------------------------------------------------------------------- 1 | #import "LAListener.h" 2 | 3 | @interface LAActivator 4 | + (LAActivator *)sharedInstance; 5 | -(id)hasSeenListenerWithName:(id)arg1; 6 | -(id)assignEvent:(id)arg1 toListenerWithName:(id)arg2; 7 | -(id)registerListener:(id)arg1 forName:(id)arg2; 8 | @end 9 | 10 | @interface LAEvent 11 | +(id)eventWithName:(id)arg1; 12 | -(void)setHandled:(BOOL)arg1; 13 | @property (nonatomic, readonly) NSString *name; 14 | @property (nonatomic, readonly) NSString *mode; 15 | @property (nonatomic, getter=isHandled) BOOL handled; 16 | @property (nonatomic, copy) NSDictionary *userInfo; 17 | @end 18 | 19 | @interface AnySpotActivator : NSObject 20 | @end 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AnySpot for iOS 9 2 | 3 | Most up to date description and pricing can be found on the BigBoss repository. 4 | 5 | Can build with XCode or in the command line 6 | 7 | Using kirb/theos 8 | 9 | Special thanks to @EthanArbuckle 10 | 11 | This package is created under the "Attribution-NonCommercial-ShareAlike 4.0 International" license. 12 | 13 | Donations via [Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2R9WDZCE7CPZ8) or [Bitcoin](https://coinbase.com/checkouts/59ead722b181591150e7de4ed6769cb4) are welcomed! 14 | 15 | There is no warranty for this product and comes as is. @twodayslate is not responsible for any damage that this product may cause. -------------------------------------------------------------------------------- /anyspotpreferences/Makefile: -------------------------------------------------------------------------------- 1 | TARGET=:clang 2 | ARCHS = armv7 armv7s arm64 3 | 4 | include $(THEOS)/makefiles/common.mk 5 | 6 | BUNDLE_NAME = AnySpotPreferences 7 | AnySpotPreferences_FILES = AnySpotRootListController.m AnySpotAdvancedListController.m 8 | AnySpotPreferences_INSTALL_PATH = /Library/PreferenceBundles 9 | AnySpotPreferences_FRAMEWORKS = UIKit 10 | AnySpotPreferences_PRIVATE_FRAMEWORKS = Preferences 11 | 12 | include $(THEOS_MAKE_PATH)/bundle.mk 13 | 14 | internal-stage:: 15 | $(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END) 16 | $(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/AnySpotPreferences.plist$(ECHO_END) 17 | -------------------------------------------------------------------------------- /anyspotpreferences/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | AnySpotPreferences 9 | CFBundleIdentifier 10 | org.thebigboss.anyspotpreferences 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSPrincipalClass 22 | AnySpotRootListController 23 | 24 | 25 | -------------------------------------------------------------------------------- /AnySpot9.xcodeproj/xcuserdata/zac.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | theos do.xcscheme_^#shared#^_ 8 | 9 | isShown 10 | 11 | orderHint 12 | 2 13 | 14 | theos release.xcscheme_^#shared#^_ 15 | 16 | orderHint 17 | 1 18 | 19 | theos.xcscheme_^#shared#^_ 20 | 21 | isShown 22 | 23 | orderHint 24 | 0 25 | 26 | 27 | SuppressBuildableAutocreation 28 | 29 | 1162203A1BE2DF9A00700CD5 30 | 31 | primary 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /anyspotpreferences/Resources/AnySpotAdvanced.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Smoothness 12 | footerText 13 | If enabled, extra steps will be added to create a smoother animation when launching and dismissing Spotlight inside an application. However, this will slow down the dismissal/cleanup process. See GitHub issue #4 for more details. 14 | 15 | 16 | cell 17 | PSSwitchCell 18 | default 19 | 20 | defaults 21 | org.thebigboss.anyspot9 22 | key 23 | extraSmooth 24 | label 25 | Enabled 26 | PostNotification 27 | org.thebigboss.anyspot9/settingschanged 28 | 29 | 30 | title 31 | Advanced 32 | 33 | 34 | -------------------------------------------------------------------------------- /AnySpotHeaders.h: -------------------------------------------------------------------------------- 1 | @interface SpringBoard 2 | + (id)sharedApplication; 3 | -(id)_accessibilityFrontMostApplication; 4 | -(BOOL)isLocked; 5 | -(void)_revealSpotlight; 6 | @property (nonatomic,readonly) UIWindow * keyWindow; 7 | @end 8 | 9 | @interface SBSearchGesture 10 | + (SBSearchGesture *)sharedInstance; 11 | - (void)revealAnimated:(_Bool)arg1; 12 | - (_Bool)_isShowingSearch; 13 | @property(readonly, nonatomic, getter=isActivated) _Bool activated; 14 | @end 15 | 16 | @interface SBSearchViewController : UIViewController 17 | + (SBSearchViewController *)sharedInstance; 18 | - (void)dismiss; 19 | - (void)searchViewControllerWillTriggerLaunch; 20 | - (BOOL)_isSupportedInterfaceOrientation:(int)arg1; 21 | @end 22 | 23 | @interface SBHomeScreenWindow : UIWindow 24 | @end 25 | 26 | @interface SBApplication 27 | - (id)mainScene; 28 | - (id)bundleIdentifier; 29 | @end 30 | 31 | @interface FBScene 32 | - (id)contextHostManager; 33 | @end 34 | 35 | @interface FBWindowContextHostManager : NSObject 36 | -(id)snapshotUIImageForFrame:(CGRect)arg1 excludingContexts:(id)arg2 opaque:(BOOL)arg3 outTransform:(CGAffineTransform*)arg4 ; 37 | @end 38 | 39 | @interface SBUIController : NSObject 40 | + (SBUIController *)sharedInstance; 41 | - (void)restoreContentAndUnscatterIconsAnimated:(BOOL)animated; 42 | @end 43 | 44 | @interface SBWallpaperController : NSObject 45 | + (SBWallpaperController *)sharedInstance; 46 | - (void)beginRequiringWithReason:(id)reason; 47 | @end 48 | 49 | @interface UIView (extras) 50 | -(id)recursiveDescription; 51 | @end -------------------------------------------------------------------------------- /Testing.xm: -------------------------------------------------------------------------------- 1 | %hook SBSearchGesture 2 | -(void)resetAnimated:(_Bool)arg1 { 3 | %log; 4 | %orig; 5 | } 6 | - (void)_displayLaunched:(id)arg1 { 7 | %log; 8 | %orig; 9 | } 10 | %end 11 | 12 | %hook SPUISearchViewController 13 | - (BOOL)_isPullDownSpotlight { 14 | // This makes it so it always shows more Siri suggestions: 15 | // Nearby, and News 16 | // However, you lose the up swipe to dismiss 17 | %log; 18 | return %orig; 19 | } 20 | %end 21 | 22 | %hook SBSearchViewController 23 | - (void)dismissAnimated:(_Bool)arg1 completionBlock:(id)arg2 { 24 | // Not sure if this is worth hooking and adding to the completion block 25 | %log; 26 | %orig; 27 | } 28 | - (void)searchViewControllerWillTriggerLaunch { 29 | %log; 30 | %orig; 31 | } 32 | %end 33 | 34 | %hook SPUISearchViewController 35 | + (void)openApplicationWithBundleID:(id)arg1 { 36 | %log; 37 | %orig; 38 | } 39 | 40 | - (void)didSelectActionItemForResult:(id)arg1 { 41 | %log; 42 | %orig; 43 | } 44 | - (void)_dismissAnimated:(BOOL)arg1 completionBlock:(id)arg2 { 45 | %log; 46 | %orig; 47 | } 48 | - (void)actionManager:(id)arg1 dismissAnimated:(BOOL)arg2 completionBlock:(id /* block */)arg3 { 49 | %log; 50 | %orig; 51 | } 52 | - (void)tableView:(id)arg1 didSelectRowAtIndexPath:(id)arg2 { 53 | %log; 54 | %orig; 55 | } 56 | %end 57 | 58 | %hook SBIconController 59 | - (_Bool)_dismissRightEdgeSpotlight:(_Bool)arg1 { 60 | %log; 61 | return %orig; 62 | } 63 | - (_Bool)_presentRightEdgeSpotlight:(_Bool)arg1 { 64 | %log; 65 | return %orig; 66 | } 67 | - (_Bool)_dismissTopEdgeSpotlight:(_Bool)arg1 { 68 | %log; 69 | return %orig; 70 | } 71 | - (_Bool)_presentTopEdgeSpotlight:(_Bool)arg1 { 72 | %log; 73 | return %orig; 74 | } 75 | - (void)_searchViewControllerIsPresented:(_Bool)arg1 fromBreadcrumb:(_Bool)arg2 { 76 | %log; 77 | %orig; 78 | } 79 | - (_Bool)dismissSpotlightIfNecessary { 80 | %log; 81 | return %orig; 82 | } 83 | - (_Bool)dismissSpotlightAnimated:(_Bool)arg1 { 84 | %log; 85 | return %orig; 86 | } 87 | - (_Bool)presentSpotlightFromEdge:(unsigned long long)arg1 fromBreadcrumb:(_Bool)arg2 animated:(_Bool)arg3 { 88 | %log; 89 | return %orig; 90 | } 91 | 92 | %end 93 | 94 | %hook SBMainDisplaySceneManager 95 | - (_Bool)_isActivatingPinnedBreadcrumbApp:(id)arg1 withTransitionContext:(id)arg2 { 96 | %log; 97 | return %orig; 98 | } 99 | - (id)_breadcrumbNavigationActionForApplication:(id)arg1 withTransitionContext:(id)arg2{ 100 | %log; 101 | return %orig; 102 | } 103 | - (void)_activateAppLink:(id)arg1 withAppLinkState:(id)arg2 transitionContext:(id)arg3 wasFromSpotlight:(_Bool)arg4 previousBreadcrumb:(id)arg5 { 104 | %log; 105 | %orig; 106 | } 107 | - (void)_activateBreadcrumbApplication:(id)arg1 { 108 | %log; 109 | %orig; 110 | } 111 | - (id)_breadcrumbBundleIdForApplication:(id)arg1 withTransitionContext:(id)arg2 { 112 | %log; 113 | return %orig; 114 | } 115 | - (void)_presentSpotlightFromEdge:(unsigned long long)arg1 fromBreadcrumb:(_Bool)arg2 { 116 | %log; 117 | %orig; 118 | } 119 | %end -------------------------------------------------------------------------------- /AnySpot9.xcodeproj/xcshareddata/xcschemes/theos.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 59 | 60 | 61 | 62 | 66 | 67 | 68 | 69 | 75 | 76 | 82 | 83 | 84 | 85 | 87 | 88 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /AnySpot9.xcodeproj/xcshareddata/xcschemes/theos do.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 58 | 59 | 60 | 61 | 65 | 66 | 67 | 68 | 69 | 70 | 76 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /anyspotpreferences/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSLinkCell 10 | label 11 | Activator Methods 12 | isController 13 | 14 | bundle 15 | LibActivator 16 | activatorListener 17 | org.thebigboss.anyspot9 18 | icon 19 | /Library/Application Support/AnySpot/assets/Recent2.png 20 | 21 | 22 | 23 | cell 24 | PSGroupCell 25 | 26 | 27 | cell 28 | PSLinkCell 29 | isController 30 | 1 31 | label 32 | Advanced Options 33 | icon 34 | /Library/Application Support/AnySpot/assets/services.png 35 | detail 36 | AnySpotAdvancedListController 37 | 38 | 39 | 40 | cell 41 | PSGroupCell 42 | 43 | 44 | cell PSButtonCell 45 | label Report an issue 46 | icon /Library/Application Support/AnySpot/assets/github.png 47 | action github 48 | 49 | 50 | 51 | cell 52 | PSGroupCell 53 | label 54 | The Author 55 | 56 | 57 | cell PSButtonCell 58 | label @twodayslate 59 | icon /Library/Application Support/AnySpot/assets/twitter.png 60 | action twitter 61 | 62 | 63 | cell PSButtonCell 64 | label Other tweaks 65 | icon /Library/Application Support/AnySpot/assets/link.png 66 | action user 67 | 68 | 69 | 70 | cell 71 | PSGroupCell 72 | label 73 | Donate 74 | 75 | 76 | cell PSButtonCell 77 | label Bitcoin 78 | icon /Library/Application Support/AnySpot/assets/bitcoin.png 79 | action bitcoin 80 | 81 | 82 | cell PSButtonCell 83 | label Paypal 84 | icon /Library/Application Support/AnySpot/assets/paypal.png 85 | action paypal 86 | 87 | 88 | 89 | 90 | 91 | title 92 | AnySpot 93 | 94 | 95 | -------------------------------------------------------------------------------- /AnySpot9.xcodeproj/xcshareddata/xcschemes/theos release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 58 | 59 | 62 | 63 | 64 | 65 | 69 | 70 | 71 | 72 | 73 | 74 | 80 | 81 | 87 | 88 | 89 | 90 | 92 | 93 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /LAListener.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | // Listeners represent specific actions that can be performed in response to an event 5 | // Must be registered with LAActivator inside SpringBoard via the registerListener:forName: method 6 | 7 | @class LAActivator, LAEvent, UIImage; 8 | 9 | @protocol LAListener 10 | @optional 11 | 12 | - (void)activator:(LAActivator *)activator didChangeToEventMode:(NSString *)eventMode; 13 | 14 | // Incoming events 15 | - (void)activator:(LAActivator *)activator receiveEvent:(LAEvent *)event forListenerName:(NSString *)listenerName; // Normal assigned events 16 | - (void)activator:(LAActivator *)activator abortEvent:(LAEvent *)event forListenerName:(NSString *)listenerName; // Sent when a chorded event gets escalated (short hold becoems a long hold, for example) 17 | - (BOOL)activator:(LAActivator *)activator receiveUnlockingDeviceEvent:(LAEvent *)event forListenerName:(NSString *)listenerName; // Sent at the lock screen when listener is not compatible with event, but potentially is able to unlock the screen to handle it 18 | - (void)activator:(LAActivator *)activator receiveDeactivateEvent:(LAEvent *)event; // Sent when the menu button is pressed. Only handle if you want to suppress the standard menu button behaviour! 19 | - (void)activator:(LAActivator *)activator otherListenerDidHandleEvent:(LAEvent *)event; // Sent when another listener has handled the event 20 | - (void)activator:(LAActivator *)activator receivePreviewEventForListenerName:(NSString *)listenerName; // Sent from the settings pane when a listener is assigned 21 | 22 | // Simpler versions 23 | - (void)activator:(LAActivator *)activator receiveEvent:(LAEvent *)event; 24 | - (void)activator:(LAActivator *)activator abortEvent:(LAEvent *)event; 25 | 26 | // Metadata (may be cached) 27 | - (NSString *)activator:(LAActivator *)activator requiresLocalizedTitleForListenerName:(NSString *)listenerName; 28 | - (NSString *)activator:(LAActivator *)activator requiresLocalizedDescriptionForListenerName:(NSString *)listenerName; 29 | - (NSString *)activator:(LAActivator *)activator requiresLocalizedGroupForListenerName:(NSString *)listenerName; 30 | - (NSNumber *)activator:(LAActivator *)activator requiresRequiresAssignmentForListenerName:(NSString *)listenerName; 31 | - (NSArray *)activator:(LAActivator *)activator requiresCompatibleEventModesForListenerWithName:(NSString *)listenerName; 32 | - (NSNumber *)activator:(LAActivator *)activator requiresIsCompatibleWithEventName:(NSString *)eventName listenerName:(NSString *)listenerName; 33 | - (NSArray *)activator:(LAActivator *)activator requiresExclusiveAssignmentGroupsForListenerName:(NSString *)listenerName; 34 | - (id)activator:(LAActivator *)activator requiresInfoDictionaryValueOfKey:(NSString *)key forListenerWithName:(NSString *)listenerName; 35 | - (BOOL)activator:(LAActivator *)activator requiresNeedsPoweredDisplayForListenerName:(NSString *)listenerName; 36 | 37 | // Icons 38 | // Fast path that supports scale 39 | - (NSData *)activator:(LAActivator *)activator requiresIconDataForListenerName:(NSString *)listenerName scale:(CGFloat *)scale; 40 | - (NSData *)activator:(LAActivator *)activator requiresSmallIconDataForListenerName:(NSString *)listenerName scale:(CGFloat *)scale; 41 | // Legacy 42 | - (NSData *)activator:(LAActivator *)activator requiresIconDataForListenerName:(NSString *)listenerName; 43 | - (NSData *)activator:(LAActivator *)activator requiresSmallIconDataForListenerName:(NSString *)listenerName; 44 | // For cases where PNG data isn't available quickly 45 | - (UIImage *)activator:(LAActivator *)activator requiresIconForListenerName:(NSString *)listenerName scale:(CGFloat)scale; 46 | - (UIImage *)activator:(LAActivator *)activator requiresSmallIconForListenerName:(NSString *)listenerName scale:(CGFloat)scale; 47 | 48 | @end -------------------------------------------------------------------------------- /anyspotpreferences/AnySpotRootListController.m: -------------------------------------------------------------------------------- 1 | #include "AnySpotRootListController.h" 2 | 3 | @implementation AnySpotRootListController 4 | 5 | - (NSArray *)specifiers { 6 | if (!_specifiers) { 7 | // Grab the Root.plist file from Resources/Root.plist and present that stuff 8 | _specifiers = [[self loadSpecifiersFromPlistName:@"Root" target:self] retain]; 9 | } 10 | 11 | return _specifiers; 12 | } 13 | 14 | /* 15 | * @param tableView 16 | * @param indexPath 17 | */ 18 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 19 | // As of now just using this method to control and check if activator is installed 20 | // and display an alert if it is not 21 | if(indexPath.section == 0 && indexPath.row == 0 && !NSClassFromString(@"LASettingsViewController")) { 22 | HBLogInfo(@"Activator not installed. Class not found!"); 23 | 24 | UIAlertController *alertController = [UIAlertController 25 | alertControllerWithTitle:@"libactivator missing!" 26 | message:@"The libactivator package is missing. Please install it if you would like to assign an Activator event to AnySpot." 27 | preferredStyle:UIAlertControllerStyleAlert]; 28 | UIAlertAction *cancelAction = [UIAlertAction 29 | actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action") 30 | style:UIAlertActionStyleCancel 31 | handler:^(UIAlertAction *action) 32 | { 33 | HBLogDebug(@"Cancel action"); 34 | 35 | }]; 36 | 37 | UIAlertAction *okAction = [UIAlertAction 38 | actionWithTitle:NSLocalizedString(@"Get", @"OK action") 39 | style:UIAlertActionStyleDefault 40 | handler:^(UIAlertAction *action) 41 | { 42 | HBLogDebug(@"OK action"); 43 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"cydia://package/libactivator"]]; 44 | //[self deselectRowAtIndexPath:indexPath animated:YES]; 45 | }]; 46 | [self.table deselectRowAtIndexPath:indexPath animated:YES]; 47 | [alertController addAction:cancelAction]; 48 | [alertController addAction:okAction]; 49 | //http://useyourloaf.com/blog/2014/09/05/uialertcontroller-changes-in-ios-8.html 50 | [self presentViewController:alertController animated:YES completion:nil]; 51 | } else { 52 | [super tableView:tableView didSelectRowAtIndexPath:indexPath]; 53 | } 54 | } 55 | 56 | -(void)github { 57 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/twodayslate/AnySpot-for-iOS-9/issues"]]; 58 | } 59 | -(void)paypal { 60 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2R9WDZCE7CPZ8"]]; 61 | } 62 | 63 | -(void)bitcoin { 64 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.coinbase.com/checkouts/07509aa1e4bd4d82c7f0b82138b51a3a"]]; 65 | } 66 | -(void)user { 67 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://zac.gorak.us/cydia"]]; 68 | } 69 | 70 | - (void)twitter { 71 | if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]) { 72 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetbot:///user_profile/twodayslate"]]; 73 | } 74 | 75 | else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitterrific:"]]) { 76 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitterrific:///profile?screen_name=twodayslate"]]; 77 | } 78 | 79 | else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetings:"]]) { 80 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetings:///user?screen_name=twodayslate"]]; 81 | } 82 | 83 | else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter:"]]) { 84 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=twodayslate"]]; 85 | } 86 | 87 | else { 88 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://mobile.twitter.com/twodayslate"]]; 89 | } 90 | } 91 | @end 92 | -------------------------------------------------------------------------------- /AnySpot9.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXFileReference section */ 10 | 118DFDFC1BE2E00400816B70 /* AnySpotHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnySpotHeaders.h; sourceTree = ""; }; 11 | 118DFDFD1BE2E00400816B70 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; 12 | 118DFDFE1BE2E00400816B70 /* Tweak.xm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc.preprocessed; fileEncoding = 4; path = Tweak.xm; sourceTree = ""; }; 13 | 118E5F071BE2FE1B00A985F3 /* Testing.xm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc.preprocessed; fileEncoding = 4; path = Testing.xm; sourceTree = ""; }; 14 | 118E5F211BED85AD00A985F3 /* anyspotpreferences */ = {isa = PBXFileReference; lastKnownFileType = folder; path = anyspotpreferences; sourceTree = ""; }; 15 | 11F25C7C1BE2E2EA00E08B3D /* control */ = {isa = PBXFileReference; lastKnownFileType = text; path = control; sourceTree = ""; }; 16 | 11F25C7D1BE2E2EA00E08B3D /* anyspot9.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = anyspot9.plist; sourceTree = ""; }; 17 | 11F25C7E1BE2E39900E08B3D /* AnySpotActivator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnySpotActivator.h; sourceTree = ""; }; 18 | 11F25C7F1BE2E3B100E08B3D /* LAListener.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LAListener.h; sourceTree = ""; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXGroup section */ 22 | 116220331BE2DF1900700CD5 = { 23 | isa = PBXGroup; 24 | children = ( 25 | 118E5F211BED85AD00A985F3 /* anyspotpreferences */, 26 | 118E5F071BE2FE1B00A985F3 /* Testing.xm */, 27 | 11F25C7E1BE2E39900E08B3D /* AnySpotActivator.h */, 28 | 118DFDFC1BE2E00400816B70 /* AnySpotHeaders.h */, 29 | 118DFDFD1BE2E00400816B70 /* Makefile */, 30 | 11F25C7C1BE2E2EA00E08B3D /* control */, 31 | 11F25C7D1BE2E2EA00E08B3D /* anyspot9.plist */, 32 | 118DFDFE1BE2E00400816B70 /* Tweak.xm */, 33 | 11F25C7F1BE2E3B100E08B3D /* LAListener.h */, 34 | ); 35 | sourceTree = ""; 36 | }; 37 | /* End PBXGroup section */ 38 | 39 | /* Begin PBXLegacyTarget section */ 40 | 1162203A1BE2DF9A00700CD5 /* theos */ = { 41 | isa = PBXLegacyTarget; 42 | buildArgumentsString = "$(ACTION)"; 43 | buildConfigurationList = 1162203B1BE2DF9A00700CD5 /* Build configuration list for PBXLegacyTarget "theos" */; 44 | buildPhases = ( 45 | ); 46 | buildToolPath = /usr/bin/make; 47 | buildWorkingDirectory = ""; 48 | dependencies = ( 49 | ); 50 | name = theos; 51 | passBuildSettingsInEnvironment = 0; 52 | productName = Theos; 53 | }; 54 | /* End PBXLegacyTarget section */ 55 | 56 | /* Begin PBXProject section */ 57 | 116220341BE2DF1900700CD5 /* Project object */ = { 58 | isa = PBXProject; 59 | attributes = { 60 | LastUpgradeCheck = 0710; 61 | TargetAttributes = { 62 | 1162203A1BE2DF9A00700CD5 = { 63 | CreatedOnToolsVersion = 7.1; 64 | }; 65 | }; 66 | }; 67 | buildConfigurationList = 116220371BE2DF1900700CD5 /* Build configuration list for PBXProject "AnySpot9" */; 68 | compatibilityVersion = "Xcode 3.2"; 69 | developmentRegion = English; 70 | hasScannedForEncodings = 0; 71 | knownRegions = ( 72 | en, 73 | ); 74 | mainGroup = 116220331BE2DF1900700CD5; 75 | projectDirPath = ""; 76 | projectRoot = ""; 77 | targets = ( 78 | 1162203A1BE2DF9A00700CD5 /* theos */, 79 | ); 80 | }; 81 | /* End PBXProject section */ 82 | 83 | /* Begin XCBuildConfiguration section */ 84 | 116220381BE2DF1900700CD5 /* Debug */ = { 85 | isa = XCBuildConfiguration; 86 | buildSettings = { 87 | }; 88 | name = Debug; 89 | }; 90 | 116220391BE2DF1900700CD5 /* Release */ = { 91 | isa = XCBuildConfiguration; 92 | buildSettings = { 93 | }; 94 | name = Release; 95 | }; 96 | 1162203C1BE2DF9A00700CD5 /* Debug */ = { 97 | isa = XCBuildConfiguration; 98 | buildSettings = { 99 | ALWAYS_SEARCH_USER_PATHS = NO; 100 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 101 | CLANG_CXX_LIBRARY = "libc++"; 102 | CLANG_ENABLE_MODULES = YES; 103 | CLANG_ENABLE_OBJC_ARC = YES; 104 | CLANG_WARN_BOOL_CONVERSION = YES; 105 | CLANG_WARN_CONSTANT_CONVERSION = YES; 106 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 107 | CLANG_WARN_EMPTY_BODY = YES; 108 | CLANG_WARN_ENUM_CONVERSION = YES; 109 | CLANG_WARN_INT_CONVERSION = YES; 110 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 111 | CLANG_WARN_UNREACHABLE_CODE = YES; 112 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 113 | COPY_PHASE_STRIP = NO; 114 | DEBUGGING_SYMBOLS = YES; 115 | DEBUG_INFORMATION_FORMAT = dwarf; 116 | ENABLE_STRICT_OBJC_MSGSEND = YES; 117 | ENABLE_TESTABILITY = YES; 118 | GCC_C_LANGUAGE_STANDARD = gnu99; 119 | GCC_DYNAMIC_NO_PIC = NO; 120 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 121 | GCC_NO_COMMON_BLOCKS = YES; 122 | GCC_OPTIMIZATION_LEVEL = 0; 123 | GCC_PREPROCESSOR_DEFINITIONS = ( 124 | "DEBUG=1", 125 | "$(inherited)", 126 | ); 127 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 128 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 129 | GCC_WARN_UNDECLARED_SELECTOR = YES; 130 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 131 | GCC_WARN_UNUSED_FUNCTION = YES; 132 | GCC_WARN_UNUSED_VARIABLE = YES; 133 | MTL_ENABLE_DEBUG_INFO = YES; 134 | ONLY_ACTIVE_ARCH = YES; 135 | OTHER_CFLAGS = ""; 136 | OTHER_LDFLAGS = ""; 137 | PRODUCT_NAME = "$(TARGET_NAME)"; 138 | }; 139 | name = Debug; 140 | }; 141 | 1162203D1BE2DF9A00700CD5 /* Release */ = { 142 | isa = XCBuildConfiguration; 143 | buildSettings = { 144 | ALWAYS_SEARCH_USER_PATHS = NO; 145 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 146 | CLANG_CXX_LIBRARY = "libc++"; 147 | CLANG_ENABLE_MODULES = YES; 148 | CLANG_ENABLE_OBJC_ARC = YES; 149 | CLANG_WARN_BOOL_CONVERSION = YES; 150 | CLANG_WARN_CONSTANT_CONVERSION = YES; 151 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 152 | CLANG_WARN_EMPTY_BODY = YES; 153 | CLANG_WARN_ENUM_CONVERSION = YES; 154 | CLANG_WARN_INT_CONVERSION = YES; 155 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 156 | CLANG_WARN_UNREACHABLE_CODE = YES; 157 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 158 | COPY_PHASE_STRIP = NO; 159 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 160 | ENABLE_NS_ASSERTIONS = NO; 161 | ENABLE_STRICT_OBJC_MSGSEND = YES; 162 | GCC_C_LANGUAGE_STANDARD = gnu99; 163 | GCC_NO_COMMON_BLOCKS = YES; 164 | GCC_PREPROCESSOR_DEFINITIONS = "FORRELEASE=1"; 165 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 166 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 167 | GCC_WARN_UNDECLARED_SELECTOR = YES; 168 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 169 | GCC_WARN_UNUSED_FUNCTION = YES; 170 | GCC_WARN_UNUSED_VARIABLE = YES; 171 | MTL_ENABLE_DEBUG_INFO = NO; 172 | OTHER_CFLAGS = ""; 173 | OTHER_LDFLAGS = ""; 174 | PRODUCT_NAME = "$(TARGET_NAME)"; 175 | }; 176 | name = Release; 177 | }; 178 | /* End XCBuildConfiguration section */ 179 | 180 | /* Begin XCConfigurationList section */ 181 | 116220371BE2DF1900700CD5 /* Build configuration list for PBXProject "AnySpot9" */ = { 182 | isa = XCConfigurationList; 183 | buildConfigurations = ( 184 | 116220381BE2DF1900700CD5 /* Debug */, 185 | 116220391BE2DF1900700CD5 /* Release */, 186 | ); 187 | defaultConfigurationIsVisible = 0; 188 | defaultConfigurationName = Release; 189 | }; 190 | 1162203B1BE2DF9A00700CD5 /* Build configuration list for PBXLegacyTarget "theos" */ = { 191 | isa = XCConfigurationList; 192 | buildConfigurations = ( 193 | 1162203C1BE2DF9A00700CD5 /* Debug */, 194 | 1162203D1BE2DF9A00700CD5 /* Release */, 195 | ); 196 | defaultConfigurationIsVisible = 0; 197 | defaultConfigurationName = Release; 198 | }; 199 | /* End XCConfigurationList section */ 200 | }; 201 | rootObject = 116220341BE2DF1900700CD5 /* Project object */; 202 | } 203 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | #import 2 | #import "AnySpotActivator.h" 3 | #import "AnySpotHeaders.h" 4 | #import "AnySpotSnapshotView.h" 5 | #import "AnySpotController.h" 6 | 7 | static UIWindow *latestHostWindow = nil; 8 | static NSString *latestBundleID = nil; 9 | static AnySpotSnapshotView *latestSnapshotView = nil; 10 | static AnySpotSnapshotView *superSmoothLatestSnapshotView = nil; 11 | static BOOL didLaunchfrominsideapplication = NO; 12 | 13 | static NSMutableDictionary *settings = nil; 14 | 15 | /* 16 | * Does any necessary cleanup of Spotlight if launched from an application 17 | * Running in the main queue to avoid exceptions for doing graphics stuff 18 | */ 19 | static void cleanup() { 20 | dispatch_async(dispatch_get_main_queue(), ^{ 21 | if(latestHostWindow) { 22 | HBLogDebug(@"Restting window level to original value"); 23 | latestHostWindow.windowLevel = 0.0; 24 | } 25 | 26 | if(latestSnapshotView) { 27 | HBLogDebug(@"remvoing from superview"); 28 | // Not sure if all this is necessary. Probably not. 29 | [latestSnapshotView removeFromSuperview]; 30 | [latestSnapshotView release]; 31 | latestSnapshotView = nil; 32 | } 33 | 34 | if(superSmoothLatestSnapshotView) { 35 | HBLogDebug(@"remvoing smoothness from superview"); 36 | // Not sure if all this is necessary. Probably not. 37 | [superSmoothLatestSnapshotView removeFromSuperview]; 38 | [superSmoothLatestSnapshotView release]; 39 | superSmoothLatestSnapshotView = nil; 40 | } 41 | 42 | UIView *outerview = ((SBSearchViewController *)[%c(SBSearchViewController) sharedInstance]).view; 43 | 44 | // For some reason the above doesn't want to work all the time so I have to do this 45 | // Extra check for a snapshot view under the search view 46 | // for(UIView *view in outerview.subviews) { 47 | // if([view isKindOfClass:[AnySpotSnapshotView class]]) { 48 | // HBLogDebug(@"Darn thing was hiding!"); 49 | // [view removeFromSuperview]; 50 | // } 51 | // } 52 | // Which is faster, above or this? 53 | [[outerview viewWithTag:667] removeFromSuperview]; 54 | 55 | BOOL extraSmooth = [settings objectForKey:@"extraSmooth"] ? [[settings objectForKey:@"extraSmooth"] boolValue] : NO; 56 | // Extra check for a snapshot view - but no idea where it is 57 | if(extraSmooth) { 58 | [[outerview.superview viewWithTag:667] removeFromSuperview]; 59 | [[outerview.superview.superview viewWithTag:667] removeFromSuperview]; 60 | } 61 | }); 62 | 63 | didLaunchfrominsideapplication = NO; 64 | latestBundleID = @""; 65 | } 66 | 67 | %hook SPUISearchViewController 68 | /* 69 | * Need to cleanup when Spotlight is dismissed 70 | * Although, this is not always called after launching from spotlight 71 | */ 72 | - (void)_didFinishDismissing { 73 | %log; 74 | %orig; 75 | cleanup(); 76 | } 77 | 78 | /* 79 | * If already inside an application, and it tries to launch itself, just dismiss spotlight 80 | * Can continue to do original action as mail might be trying to open a different 81 | * email or something like that - that is a bad example but you get the idea 82 | */ 83 | + (void)openApplicationWithBundleID:(id)arg1 { 84 | %log; 85 | if(latestBundleID && [latestBundleID isEqualToString:arg1]){ 86 | [(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] dismiss]; 87 | } 88 | %orig; 89 | } 90 | /* 91 | * Similiar to + (void)openApplicationWithBundleID:(id)arg1 except has more details 92 | * Have to cleanup so add that to the completion handler 93 | * HAVE TO RUN dismiss in main thread or the device will crash 94 | * @param arg1 the bundle identifier for the application that is being launched 95 | * @param arg2 the action that will occure when the application is done launching 96 | * for example, when launching mail, it will then go to a certain email 97 | * @param arg3 what happens when everything is done. I think this is for breadcrumbs 98 | */ 99 | + (void)openApplicationWithBundleID:(id)arg1 continuationAction:(id)arg2 completionHandler:(void(^)(void))arg3 { 100 | HBLogDebug(@"SPUISearchViewController openApplicationWithBundleID:%@ continuationAction:%@ completionHandler:%@", arg1, arg2, (id)arg3); 101 | if(latestBundleID && [latestBundleID isEqualToString:arg1]){ 102 | [(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] dismiss]; 103 | } else { 104 | if(arg3) { 105 | void (^blockName)(void) = ^ { 106 | cleanup(); 107 | dispatch_async(dispatch_get_main_queue(), ^{ 108 | [(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] dismiss]; 109 | }); 110 | Block_copy(arg3); 111 | }; 112 | %orig(arg1, arg2, blockName); 113 | } else { 114 | void (^blockName)(void) = ^ { 115 | dispatch_async(dispatch_get_main_queue(), ^{ 116 | [(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] dismiss]; 117 | }); 118 | }; 119 | 120 | %orig(arg1, arg2, blockName); 121 | } 122 | } 123 | } 124 | 125 | /* 126 | * Need to cleanup after opening a URL (Search web) 127 | * _displayLaunched: is also called for a search 128 | * @param arg1 the url that will be launched 129 | */ 130 | - (void)openURL:(id)arg1 { 131 | %log; 132 | if(didLaunchfrominsideapplication) { 133 | dispatch_async(dispatch_get_main_queue(), ^{ 134 | [(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] dismiss]; 135 | }); 136 | } 137 | %orig; 138 | } 139 | %end 140 | 141 | %hook SBMainDisplaySceneManager 142 | /* 143 | * Determines if a breadcrumb should show 144 | * @param arg1 where you are going 145 | * @param arg2 where you came from 146 | * @return YES if you want a breadcrumb 147 | */ 148 | - (_Bool)_shouldBreadcrumbApplication:(id)arg1 withTransitionContext:(id)arg2 { 149 | %log; 150 | // This will remove the breadcrumb that will take you back to Spotlight 151 | // on SpringBoard's homescreen if launched from inside an application 152 | // What should actually happen is the breadcrumb should take you back to the application 153 | if(didLaunchfrominsideapplication) { 154 | cleanup(); 155 | return NO; 156 | } 157 | return %orig; 158 | } 159 | %end 160 | 161 | %hook SpringBoard 162 | /* 163 | * You need this to enable rotation on non-rotatable devices 164 | * Currently not being used 165 | * @return YES if you want rotation 166 | */ 167 | - (_Bool)homeScreenSupportsRotation { 168 | if([(SBSearchGesture *)[%c(SBSearchGesture) sharedInstance] _isShowingSearch]) { 169 | return YES; 170 | } 171 | return %orig; 172 | } 173 | /* 174 | * You need this to enable rotation on non-rotatable devices 175 | * Currently not being used 176 | * @return YES if you want rotation 177 | */ 178 | - (_Bool)homeScreenRotationStyleWantsUIKitRotation { 179 | if([(SBSearchGesture *)[%c(SBSearchGesture) sharedInstance] _isShowingSearch]) { 180 | return YES; 181 | } 182 | return %orig; 183 | } 184 | 185 | /* 186 | * You need this to enable rotation on non-rotatable devices 187 | * Currently not being used 188 | * @return the style of rotation, doesn't really matter I don't think 189 | */ 190 | - (long long)homeScreenRotationStyle { 191 | if([(SBSearchGesture *)[%c(SBSearchGesture) sharedInstance] _isShowingSearch]) { 192 | return 1.0; 193 | } 194 | return %orig; 195 | } 196 | 197 | /* 198 | * Since not all devices support orientation we will have to do some things 199 | * to get Spotlight to not look terrible when rotating 200 | * Pretty sure Ethan can make this better but I'm not gonna bother him 201 | * @param arg1 the new orientation of the device 202 | * @param arg2 how long the animation will last 203 | */ 204 | - (void)noteInterfaceOrientationChanged:(long long)arg1 duration:(double)arg2 { 205 | // duration is usually 3 or 4 206 | %log; 207 | %orig; 208 | if([(SBSearchGesture *)[%c(SBSearchGesture) sharedInstance] _isShowingSearch]) { 209 | if(![(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] _isSupportedInterfaceOrientation:arg1]) { 210 | HBLogWarn(@"AnySpot9: Interface is not supported so have to dismiss. Sorry!"); 211 | [(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] dismiss]; 212 | } else { 213 | SBApplication *frontMostApplication = [(SpringBoard *)[%c(SpringBoard) sharedApplication] _accessibilityFrontMostApplication]; 214 | latestBundleID =[frontMostApplication bundleIdentifier]; 215 | HBLogDebug(@"AnySpot9: frontMostApplication = %@", frontMostApplication); 216 | // Check if in application, need the new orientation screenshot 217 | if(frontMostApplication != nil) { 218 | FBScene *appScene = [frontMostApplication mainScene]; 219 | FBWindowContextHostManager *contextHost = [appScene contextHostManager]; 220 | UIImage *snapshot = [contextHost snapshotUIImageForFrame:[[UIScreen mainScreen] applicationFrame] excludingContexts:nil opaque:NO outTransform:nil]; 221 | latestSnapshotView = [[AnySpotSnapshotView alloc] initWithImage:snapshot]; 222 | superSmoothLatestSnapshotView = [[AnySpotSnapshotView alloc] initWithImage:snapshot]; 223 | } 224 | } 225 | } 226 | } 227 | %end 228 | 229 | 230 | %hook SBNotificationCenterController 231 | /* 232 | * Hooking this message if they want to replace the notification center with Spotlight 233 | * @param arg1 location that the touch for launching Notification center began 234 | * @param arg2 a block of some sort 235 | */ 236 | - (void)beginPresentationWithTouchLocation:(id)arg1 presentationBegunHandler:(id)arg2 { 237 | BOOL replace_nc = [settings objectForKey:@"replace_nc"] ? [[settings objectForKey:@"replace_nc"] boolValue] : NO; 238 | if(replace_nc) { 239 | [AnySpotController togglePresentation]; 240 | } else { 241 | %orig; 242 | } 243 | } 244 | 245 | /* 246 | * Hooking this message so get rid of the NC grabber if they just want Spotlight 247 | * @return whether or not there will be a grabber 248 | */ 249 | -(BOOL)isGrabberEnabled { 250 | %log; 251 | BOOL replace_nc = [settings objectForKey:@"replace_nc"] ? [[settings objectForKey:@"replace_nc"] boolValue] : NO; 252 | if(replace_nc) { 253 | return NO; 254 | } 255 | return %orig; 256 | } 257 | %end 258 | 259 | @implementation AnySpotController 260 | /* 261 | * Allows developers to call on AnySpot and present it or dismiss it 262 | * @return NO if dismissing, yes if presenting 263 | */ 264 | +(BOOL)togglePresentation { 265 | HBLogDebug(@"AnySpot9: _isShowingSearch = %d", [(SBSearchGesture *)[%c(SBSearchGesture) sharedInstance] _isShowingSearch]); 266 | HBLogDebug(@"AnySpot9: SBSearchGesture.activeted = %d", ((SBSearchGesture *)[%c(SBSearchGesture) sharedInstance]).activated); 267 | 268 | didLaunchfrominsideapplication = NO; 269 | 270 | // First check if search is showing... 271 | if([(SBSearchGesture *)[%c(SBSearchGesture) sharedInstance] _isShowingSearch]) { 272 | HBLogInfo(@"AnySpot9: Dismissing since Spotlight is already showing."); 273 | [(SBSearchViewController *)[%c(SBSearchViewController) sharedInstance] dismiss]; 274 | return NO; 275 | } 276 | else { 277 | HBLogDebug(@"AnySpot9: keyWindow = %@", (SBHomeScreenWindow *)((SpringBoard *)[%c(SpringBoard) sharedApplication]).keyWindow); 278 | SBApplication *frontMostApplication = [(SpringBoard *)[%c(SpringBoard) sharedApplication] _accessibilityFrontMostApplication]; 279 | latestBundleID =[frontMostApplication bundleIdentifier]; 280 | 281 | HBLogDebug(@"AnySpot9: frontMostApplication = %@", frontMostApplication); 282 | 283 | // Check if in application 284 | if(frontMostApplication != nil) { 285 | HBLogInfo(@"AnySpot9: Launching from inside %@", latestBundleID); 286 | didLaunchfrominsideapplication = YES; 287 | FBScene *appScene = [frontMostApplication mainScene]; 288 | FBWindowContextHostManager *contextHost = [appScene contextHostManager]; 289 | UIImage *snapshot = [contextHost snapshotUIImageForFrame:[[UIScreen mainScreen] applicationFrame] excludingContexts:nil opaque:NO outTransform:nil]; 290 | latestSnapshotView = [[AnySpotSnapshotView alloc] initWithImage:snapshot]; 291 | latestSnapshotView.tag = 666; 292 | superSmoothLatestSnapshotView = [[AnySpotSnapshotView alloc] initWithImage:snapshot]; 293 | superSmoothLatestSnapshotView.tag = 667; 294 | 295 | latestHostWindow = [[contextHost valueForKey:@"_hostView"] window]; 296 | 297 | UIView *outerview = ((SBSearchViewController *)[%c(SBSearchViewController) sharedInstance]).view; 298 | // I would love to insert the image in outerview's superview but this caused 299 | // removing it more difficult. 300 | HBLogDebug(@"Adding UIImage to %@", outerview); 301 | [outerview insertSubview:latestSnapshotView atIndex:0]; 302 | 303 | BOOL extraSmooth = [settings objectForKey:@"extraSmooth"] ? [[settings objectForKey:@"extraSmooth"] boolValue] : NO; 304 | if(extraSmooth) { 305 | HBLogDebug(@"Going for some extra smoothness to %@", outerview.superview); 306 | [outerview.superview insertSubview:superSmoothLatestSnapshotView belowSubview:outerview]; 307 | } 308 | 309 | latestHostWindow.windowLevel = -3.0; // put it under the homescreen which is -2.0 310 | [(SBUIController *)[%c(SBUIController) sharedInstance] restoreContentAndUnscatterIconsAnimated:NO]; 311 | //[[SBWallpaperController sharedInstance] beginRequiringWithReason:@"HSCloseAppGesture"]; 312 | 313 | [(SBSearchGesture *)[%c(SBSearchGesture) sharedInstance] revealAnimated:YES]; 314 | } 315 | else { 316 | //check if on the lockscreen 317 | if ([(SpringBoard*)[%c(SpringBoard) sharedApplication] isLocked]) { 318 | HBLogInfo(@"AnySpot9: Screen is locked so cannot display Spotlight. Sorry!"); 319 | } 320 | else { 321 | HBLogInfo(@"AnySpot9: Launching from SpringBoard."); 322 | [(SpringBoard*)[%c(SpringBoard) sharedApplication] _revealSpotlight]; 323 | } 324 | } 325 | } 326 | return YES; 327 | } 328 | @end 329 | 330 | 331 | @implementation AnySpotActivator 332 | - (void)activator:(id)activator receiveEvent:(LAEvent *)event { 333 | HBLogDebug(@"AnySpot9: event = %@", event); 334 | [AnySpotController togglePresentation]; 335 | [event setHandled:YES]; 336 | } 337 | 338 | - (NSString *)activator:(LAActivator *)activator requiresLocalizedTitleForListenerName:(NSString *)listenerName { 339 | return @"AnySpot"; 340 | } 341 | 342 | - (NSString *)activator:(LAActivator *)activator requiresLocalizedDescriptionForListenerName:(NSString *)listenerName { 343 | return @"Toggle AnySpot."; 344 | } 345 | 346 | - (NSArray *)activator:(LAActivator *)activator requiresCompatibleEventModesForListenerWithName:(NSString *)listenerName { 347 | return [NSArray arrayWithObjects:@"springboard", @"lockscreen", @"application", nil]; 348 | } 349 | @end 350 | 351 | static void getSettings() { 352 | 353 | settings = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/org.thebigboss.anyspot9.plist"]; 354 | //logging = [settings objectForKey:@"logging_enabled"] ? [[settings objectForKey:@"logging_enabled"] boolValue] : NO; 355 | HBLogDebug(@"Settings changed or initiated %@", settings); 356 | } 357 | 358 | %ctor { 359 | dlopen("/usr/lib/libactivator.dylib", RTLD_LAZY); 360 | //TODO: put this in the init function 361 | static AnySpotActivator *listener = [[AnySpotActivator alloc] init]; 362 | [(LAActivator *)[%c(LAActivator) sharedInstance] registerListener:listener forName:@"org.thebigboss.anyspot9"]; 363 | CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)getSettings, CFSTR("org.thebigboss.anyspot9/settingschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce); 364 | getSettings(); 365 | 366 | } --------------------------------------------------------------------------------