├── .gitignore
├── FLEX
├── .clang-format
├── .github
│ ├── FUNDING.yml
│ └── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ └── feature_request.md
├── .gitignore
├── .travis.yml
├── .vscode
│ └── settings.json
├── CONTRIBUTING.md
├── Classes
│ ├── Core
│ │ ├── Controllers
│ │ │ ├── FLEXFilteringTableViewController.h
│ │ │ ├── FLEXFilteringTableViewController.m
│ │ │ ├── FLEXNavigationController.h
│ │ │ ├── FLEXNavigationController.m
│ │ │ ├── FLEXTableViewController.h
│ │ │ └── FLEXTableViewController.m
│ │ ├── FLEXSingleRowSection.h
│ │ ├── FLEXSingleRowSection.m
│ │ ├── FLEXTableViewSection.h
│ │ ├── FLEXTableViewSection.m
│ │ └── Views
│ │ │ ├── Carousel
│ │ │ ├── FLEXCarouselCell.h
│ │ │ ├── FLEXCarouselCell.m
│ │ │ ├── FLEXScopeCarousel.h
│ │ │ └── FLEXScopeCarousel.m
│ │ │ ├── Cells
│ │ │ ├── FLEXCodeFontCell.h
│ │ │ ├── FLEXCodeFontCell.m
│ │ │ ├── FLEXKeyValueTableViewCell.h
│ │ │ ├── FLEXKeyValueTableViewCell.m
│ │ │ ├── FLEXMultilineTableViewCell.h
│ │ │ ├── FLEXMultilineTableViewCell.m
│ │ │ ├── FLEXSubtitleTableViewCell.h
│ │ │ ├── FLEXSubtitleTableViewCell.m
│ │ │ ├── FLEXTableViewCell.h
│ │ │ └── FLEXTableViewCell.m
│ │ │ ├── FLEXTableView.h
│ │ │ └── FLEXTableView.m
│ ├── Editing
│ │ ├── ArgumentInputViews
│ │ │ ├── FLEXArgumentInputColorView.h
│ │ │ ├── FLEXArgumentInputColorView.m
│ │ │ ├── FLEXArgumentInputDateView.h
│ │ │ ├── FLEXArgumentInputDateView.m
│ │ │ ├── FLEXArgumentInputFontView.h
│ │ │ ├── FLEXArgumentInputFontView.m
│ │ │ ├── FLEXArgumentInputFontsPickerView.h
│ │ │ ├── FLEXArgumentInputFontsPickerView.m
│ │ │ ├── FLEXArgumentInputNotSupportedView.h
│ │ │ ├── FLEXArgumentInputNotSupportedView.m
│ │ │ ├── FLEXArgumentInputNumberView.h
│ │ │ ├── FLEXArgumentInputNumberView.m
│ │ │ ├── FLEXArgumentInputObjectView.h
│ │ │ ├── FLEXArgumentInputObjectView.m
│ │ │ ├── FLEXArgumentInputStringView.h
│ │ │ ├── FLEXArgumentInputStringView.m
│ │ │ ├── FLEXArgumentInputStructView.h
│ │ │ ├── FLEXArgumentInputStructView.m
│ │ │ ├── FLEXArgumentInputSwitchView.h
│ │ │ ├── FLEXArgumentInputSwitchView.m
│ │ │ ├── FLEXArgumentInputTextView.h
│ │ │ ├── FLEXArgumentInputTextView.m
│ │ │ ├── FLEXArgumentInputView.h
│ │ │ └── FLEXArgumentInputView.m
│ │ ├── FLEXArgumentInputViewFactory.h
│ │ ├── FLEXArgumentInputViewFactory.m
│ │ ├── FLEXDefaultEditorViewController.h
│ │ ├── FLEXDefaultEditorViewController.m
│ │ ├── FLEXFieldEditorView.h
│ │ ├── FLEXFieldEditorView.m
│ │ ├── FLEXFieldEditorViewController.h
│ │ ├── FLEXFieldEditorViewController.m
│ │ ├── FLEXMethodCallingViewController.h
│ │ ├── FLEXMethodCallingViewController.m
│ │ ├── FLEXVariableEditorViewController.h
│ │ └── FLEXVariableEditorViewController.m
│ ├── ExplorerInterface
│ │ ├── Bookmarks
│ │ │ ├── FLEXBookmarkManager.h
│ │ │ ├── FLEXBookmarkManager.m
│ │ │ ├── FLEXBookmarksViewController.h
│ │ │ └── FLEXBookmarksViewController.m
│ │ ├── FLEXExplorerViewController.h
│ │ ├── FLEXExplorerViewController.m
│ │ ├── FLEXViewControllersViewController.h
│ │ ├── FLEXViewControllersViewController.m
│ │ ├── FLEXWindow.h
│ │ ├── FLEXWindow.m
│ │ ├── FLEXWindowManagerController.h
│ │ ├── FLEXWindowManagerController.m
│ │ └── Tabs
│ │ │ ├── FLEXTabList.h
│ │ │ ├── FLEXTabList.m
│ │ │ ├── FLEXTabsViewController.h
│ │ │ └── FLEXTabsViewController.m
│ ├── FLEX-Categories.h
│ ├── FLEX-Core.h
│ ├── FLEX-ObjectExploring.h
│ ├── FLEX-Runtime.h
│ ├── FLEX.h
│ ├── GlobalStateExplorers
│ │ ├── DatabaseBrowser
│ │ │ ├── FLEXDBQueryRowCell.h
│ │ │ ├── FLEXDBQueryRowCell.m
│ │ │ ├── FLEXDatabaseManager.h
│ │ │ ├── FLEXMultiColumnTableView.h
│ │ │ ├── FLEXMultiColumnTableView.m
│ │ │ ├── FLEXRealmDatabaseManager.h
│ │ │ ├── FLEXRealmDatabaseManager.m
│ │ │ ├── FLEXRealmDefines.h
│ │ │ ├── FLEXSQLResult.h
│ │ │ ├── FLEXSQLResult.m
│ │ │ ├── FLEXSQLiteDatabaseManager.h
│ │ │ ├── FLEXSQLiteDatabaseManager.m
│ │ │ ├── FLEXTableColumnHeader.h
│ │ │ ├── FLEXTableColumnHeader.m
│ │ │ ├── FLEXTableContentViewController.h
│ │ │ ├── FLEXTableContentViewController.m
│ │ │ ├── FLEXTableLeftCell.h
│ │ │ ├── FLEXTableLeftCell.m
│ │ │ ├── FLEXTableListViewController.h
│ │ │ ├── FLEXTableListViewController.m
│ │ │ ├── FLEXTableRowDataViewController.h
│ │ │ ├── FLEXTableRowDataViewController.m
│ │ │ └── LICENSE
│ │ ├── FLEXAPNSViewController.h
│ │ ├── FLEXAPNSViewController.m
│ │ ├── FLEXAddressExplorerCoordinator.h
│ │ ├── FLEXAddressExplorerCoordinator.m
│ │ ├── FLEXCookiesViewController.h
│ │ ├── FLEXCookiesViewController.m
│ │ ├── FLEXLiveObjectsController.h
│ │ ├── FLEXLiveObjectsController.m
│ │ ├── FLEXObjectListViewController.h
│ │ ├── FLEXObjectListViewController.m
│ │ ├── FLEXObjectRef.h
│ │ ├── FLEXObjectRef.m
│ │ ├── FLEXWebViewController.h
│ │ ├── FLEXWebViewController.m
│ │ ├── FileBrowser
│ │ │ ├── FLEXActivityViewController.h
│ │ │ ├── FLEXActivityViewController.m
│ │ │ ├── FLEXFileBrowserController.h
│ │ │ ├── FLEXFileBrowserController.m
│ │ │ ├── FLEXFileBrowserSearchOperation.h
│ │ │ └── FLEXFileBrowserSearchOperation.m
│ │ ├── Globals
│ │ │ ├── FLEXGlobalsEntry.h
│ │ │ ├── FLEXGlobalsEntry.m
│ │ │ ├── FLEXGlobalsSection.h
│ │ │ ├── FLEXGlobalsSection.m
│ │ │ ├── FLEXGlobalsViewController.h
│ │ │ └── FLEXGlobalsViewController.m
│ │ ├── Keychain
│ │ │ ├── FLEXKeychain.h
│ │ │ ├── FLEXKeychain.m
│ │ │ ├── FLEXKeychainQuery.h
│ │ │ ├── FLEXKeychainQuery.m
│ │ │ ├── FLEXKeychainViewController.h
│ │ │ ├── FLEXKeychainViewController.m
│ │ │ └── SSKeychain_LICENSE
│ │ ├── RuntimeBrowser
│ │ │ ├── DataSources
│ │ │ │ ├── FLEXRuntimeClient.h
│ │ │ │ ├── FLEXRuntimeClient.m
│ │ │ │ ├── FLEXRuntimeController.h
│ │ │ │ ├── FLEXRuntimeController.m
│ │ │ │ ├── FLEXRuntimeExporter.h
│ │ │ │ └── FLEXRuntimeExporter.m
│ │ │ ├── FLEXKBToolbarButton.h
│ │ │ ├── FLEXKBToolbarButton.m
│ │ │ ├── FLEXKeyPathSearchController.h
│ │ │ ├── FLEXKeyPathSearchController.m
│ │ │ ├── FLEXKeyboardToolbar.h
│ │ │ ├── FLEXKeyboardToolbar.m
│ │ │ ├── FLEXObjcRuntimeViewController.h
│ │ │ ├── FLEXObjcRuntimeViewController.m
│ │ │ ├── FLEXRuntimeBrowserToolbar.h
│ │ │ ├── FLEXRuntimeBrowserToolbar.m
│ │ │ ├── FLEXRuntimeKeyPath.h
│ │ │ ├── FLEXRuntimeKeyPath.m
│ │ │ ├── FLEXRuntimeKeyPathTokenizer.h
│ │ │ ├── FLEXRuntimeKeyPathTokenizer.m
│ │ │ ├── FLEXSearchToken.h
│ │ │ └── FLEXSearchToken.m
│ │ └── SystemLog
│ │ │ ├── ActivityStreamAPI.h
│ │ │ ├── FLEXASLLogController.h
│ │ │ ├── FLEXASLLogController.m
│ │ │ ├── FLEXLogController.h
│ │ │ ├── FLEXOSLogController.h
│ │ │ ├── FLEXOSLogController.m
│ │ │ ├── FLEXSystemLogCell.h
│ │ │ ├── FLEXSystemLogCell.m
│ │ │ ├── FLEXSystemLogMessage.h
│ │ │ ├── FLEXSystemLogMessage.m
│ │ │ ├── FLEXSystemLogViewController.h
│ │ │ ├── FLEXSystemLogViewController.m
│ │ │ └── LLVM_LICENSE.TXT
│ ├── Headers
│ │ ├── CALayer+FLEX.h
│ │ ├── FLEX-Categories.h
│ │ ├── FLEX-Core.h
│ │ ├── FLEX-ObjectExploring.h
│ │ ├── FLEX-Runtime.h
│ │ ├── FLEX.h
│ │ ├── FLEXAlert.h
│ │ ├── FLEXBlockDescription.h
│ │ ├── FLEXClassBuilder.h
│ │ ├── FLEXCodeFontCell.h
│ │ ├── FLEXCollectionContentSection.h
│ │ ├── FLEXColorPreviewSection.h
│ │ ├── FLEXDefaultsContentSection.h
│ │ ├── FLEXExplorerToolbar.h
│ │ ├── FLEXExplorerToolbarItem.h
│ │ ├── FLEXFilteringTableViewController.h
│ │ ├── FLEXGlobalsEntry.h
│ │ ├── FLEXIvar.h
│ │ ├── FLEXKeyValueTableViewCell.h
│ │ ├── FLEXMacros.h
│ │ ├── FLEXManager+Extensibility.h
│ │ ├── FLEXManager+Networking.h
│ │ ├── FLEXManager.h
│ │ ├── FLEXMetadataExtras.h
│ │ ├── FLEXMetadataSection.h
│ │ ├── FLEXMethod.h
│ │ ├── FLEXMethodBase.h
│ │ ├── FLEXMirror.h
│ │ ├── FLEXMultilineTableViewCell.h
│ │ ├── FLEXMutableListSection.h
│ │ ├── FLEXNavigationController.h
│ │ ├── FLEXObjcInternal.h
│ │ ├── FLEXObjectExplorer.h
│ │ ├── FLEXObjectExplorerFactory.h
│ │ ├── FLEXObjectExplorerViewController.h
│ │ ├── FLEXObjectInfoSection.h
│ │ ├── FLEXProperty.h
│ │ ├── FLEXPropertyAttributes.h
│ │ ├── FLEXProtocol.h
│ │ ├── FLEXProtocolBuilder.h
│ │ ├── FLEXResources.h
│ │ ├── FLEXRuntime+Compare.h
│ │ ├── FLEXRuntime+UIKitHelpers.h
│ │ ├── FLEXRuntimeConstants.h
│ │ ├── FLEXRuntimeSafety.h
│ │ ├── FLEXShortcut.h
│ │ ├── FLEXShortcutsSection.h
│ │ ├── FLEXSingleRowSection.h
│ │ ├── FLEXSubtitleTableViewCell.h
│ │ ├── FLEXSwiftInternal.h
│ │ ├── FLEXTableView.h
│ │ ├── FLEXTableViewCell.h
│ │ ├── FLEXTableViewController.h
│ │ ├── FLEXTableViewSection.h
│ │ ├── FLEXTypeEncodingParser.h
│ │ ├── NSArray+FLEX.h
│ │ ├── NSDateFormatter+FLEX.h
│ │ ├── NSObject+FLEX_Reflection.h
│ │ ├── NSTimer+FLEX.h
│ │ ├── NSUserDefaults+FLEX.h
│ │ ├── UIBarButtonItem+FLEX.h
│ │ ├── UIFont+FLEX.h
│ │ ├── UIGestureRecognizer+Blocks.h
│ │ ├── UIMenu+FLEX.h
│ │ ├── UIPasteboard+FLEX.h
│ │ └── UITextField+Range.h
│ ├── Info.plist
│ ├── Manager
│ │ ├── FLEXManager+Extensibility.h
│ │ ├── FLEXManager+Extensibility.m
│ │ ├── FLEXManager+Networking.h
│ │ ├── FLEXManager+Networking.m
│ │ ├── FLEXManager.h
│ │ ├── FLEXManager.m
│ │ └── Private
│ │ │ └── FLEXManager+Private.h
│ ├── Network
│ │ ├── FLEXFirebaseTransaction.mm
│ │ ├── FLEXHTTPTransactionDetailController.h
│ │ ├── FLEXHTTPTransactionDetailController.m
│ │ ├── FLEXMITMDataSource.h
│ │ ├── FLEXMITMDataSource.m
│ │ ├── FLEXNetworkCurlLogger.h
│ │ ├── FLEXNetworkCurlLogger.m
│ │ ├── FLEXNetworkMITMViewController.h
│ │ ├── FLEXNetworkMITMViewController.m
│ │ ├── FLEXNetworkRecorder.h
│ │ ├── FLEXNetworkRecorder.m
│ │ ├── FLEXNetworkSettingsController.h
│ │ ├── FLEXNetworkSettingsController.m
│ │ ├── FLEXNetworkTransaction.h
│ │ ├── FLEXNetworkTransaction.m
│ │ ├── FLEXNetworkTransactionCell.h
│ │ ├── FLEXNetworkTransactionCell.m
│ │ ├── Firestore.h
│ │ ├── OSCache
│ │ │ ├── LICENSE.md
│ │ │ ├── OSCache.h
│ │ │ └── OSCache.m
│ │ └── PonyDebugger
│ │ │ ├── FLEXNetworkObserver.h
│ │ │ ├── FLEXNetworkObserver.m
│ │ │ └── LICENSE
│ ├── ObjectExplorers
│ │ ├── FLEXObjectExplorer.h
│ │ ├── FLEXObjectExplorer.m
│ │ ├── FLEXObjectExplorerFactory.h
│ │ ├── FLEXObjectExplorerFactory.m
│ │ ├── FLEXObjectExplorerViewController.h
│ │ ├── FLEXObjectExplorerViewController.m
│ │ └── Sections
│ │ │ ├── FLEXCollectionContentSection.h
│ │ │ ├── FLEXCollectionContentSection.m
│ │ │ ├── FLEXColorPreviewSection.h
│ │ │ ├── FLEXColorPreviewSection.m
│ │ │ ├── FLEXDefaultsContentSection.h
│ │ │ ├── FLEXDefaultsContentSection.m
│ │ │ ├── FLEXMetadataSection.h
│ │ │ ├── FLEXMetadataSection.m
│ │ │ ├── FLEXMutableListSection.h
│ │ │ ├── FLEXMutableListSection.m
│ │ │ ├── FLEXObjectInfoSection.h
│ │ │ └── Shortcuts
│ │ │ ├── FLEXBlockShortcuts.h
│ │ │ ├── FLEXBlockShortcuts.m
│ │ │ ├── FLEXBundleShortcuts.h
│ │ │ ├── FLEXBundleShortcuts.m
│ │ │ ├── FLEXClassShortcuts.h
│ │ │ ├── FLEXClassShortcuts.m
│ │ │ ├── FLEXImageShortcuts.h
│ │ │ ├── FLEXImageShortcuts.m
│ │ │ ├── FLEXLayerShortcuts.h
│ │ │ ├── FLEXLayerShortcuts.m
│ │ │ ├── FLEXNSDataShortcuts.h
│ │ │ ├── FLEXNSDataShortcuts.m
│ │ │ ├── FLEXNSStringShortcuts.h
│ │ │ ├── FLEXNSStringShortcuts.m
│ │ │ ├── FLEXShortcut.h
│ │ │ ├── FLEXShortcut.m
│ │ │ ├── FLEXShortcutsFactory+Defaults.h
│ │ │ ├── FLEXShortcutsFactory+Defaults.m
│ │ │ ├── FLEXShortcutsSection.h
│ │ │ ├── FLEXShortcutsSection.m
│ │ │ ├── FLEXUIAppShortcuts.h
│ │ │ ├── FLEXUIAppShortcuts.m
│ │ │ ├── FLEXViewControllerShortcuts.h
│ │ │ ├── FLEXViewControllerShortcuts.m
│ │ │ ├── FLEXViewShortcuts.h
│ │ │ ├── FLEXViewShortcuts.m
│ │ │ ├── FLEXWindowShortcuts.h
│ │ │ └── FLEXWindowShortcuts.m
│ ├── Toolbar
│ │ ├── FLEXExplorerToolbar.h
│ │ ├── FLEXExplorerToolbar.m
│ │ ├── FLEXExplorerToolbarItem.h
│ │ └── FLEXExplorerToolbarItem.m
│ ├── Utility
│ │ ├── APPLE_LICENSE
│ │ ├── Categories
│ │ │ ├── CALayer+FLEX.h
│ │ │ ├── CALayer+FLEX.m
│ │ │ ├── FLEXRuntime+Compare.h
│ │ │ ├── FLEXRuntime+Compare.m
│ │ │ ├── FLEXRuntime+UIKitHelpers.h
│ │ │ ├── FLEXRuntime+UIKitHelpers.m
│ │ │ ├── NSArray+FLEX.h
│ │ │ ├── NSArray+FLEX.m
│ │ │ ├── NSDateFormatter+FLEX.h
│ │ │ ├── NSDateFormatter+FLEX.m
│ │ │ ├── NSObject+FLEX_Reflection.h
│ │ │ ├── NSObject+FLEX_Reflection.m
│ │ │ ├── NSTimer+FLEX.h
│ │ │ ├── NSTimer+FLEX.m
│ │ │ ├── NSUserDefaults+FLEX.h
│ │ │ ├── NSUserDefaults+FLEX.m
│ │ │ ├── Private
│ │ │ │ ├── Cocoa+FLEXShortcuts.h
│ │ │ │ ├── Cocoa+FLEXShortcuts.m
│ │ │ │ ├── NSDictionary+ObjcRuntime.h
│ │ │ │ ├── NSDictionary+ObjcRuntime.m
│ │ │ │ ├── NSMapTable+FLEX_Subscripting.h
│ │ │ │ ├── NSMapTable+FLEX_Subscripting.m
│ │ │ │ ├── NSString+FLEX.h
│ │ │ │ ├── NSString+FLEX.m
│ │ │ │ ├── NSString+ObjcRuntime.h
│ │ │ │ ├── NSString+ObjcRuntime.m
│ │ │ │ ├── UIView+FLEX_Layout.h
│ │ │ │ └── UIView+FLEX_Layout.m
│ │ │ ├── UIBarButtonItem+FLEX.h
│ │ │ ├── UIBarButtonItem+FLEX.m
│ │ │ ├── UIFont+FLEX.h
│ │ │ ├── UIFont+FLEX.m
│ │ │ ├── UIGestureRecognizer+Blocks.h
│ │ │ ├── UIGestureRecognizer+Blocks.m
│ │ │ ├── UIMenu+FLEX.h
│ │ │ ├── UIMenu+FLEX.m
│ │ │ ├── UIPasteboard+FLEX.h
│ │ │ ├── UIPasteboard+FLEX.m
│ │ │ ├── UITextField+Range.h
│ │ │ └── UITextField+Range.m
│ │ ├── FLEXAlert.h
│ │ ├── FLEXAlert.m
│ │ ├── FLEXColor.h
│ │ ├── FLEXColor.m
│ │ ├── FLEXHeapEnumerator.h
│ │ ├── FLEXHeapEnumerator.m
│ │ ├── FLEXMacros.h
│ │ ├── FLEXResources.h
│ │ ├── FLEXResources.m
│ │ ├── FLEXUtility.h
│ │ ├── FLEXUtility.m
│ │ ├── Keyboard
│ │ │ ├── FLEXKeyboardHelpViewController.h
│ │ │ ├── FLEXKeyboardHelpViewController.m
│ │ │ ├── FLEXKeyboardShortcutManager.h
│ │ │ └── FLEXKeyboardShortcutManager.m
│ │ └── Runtime
│ │ │ ├── FLEXRuntimeUtility.h
│ │ │ ├── FLEXRuntimeUtility.m
│ │ │ ├── Objc
│ │ │ ├── FLEXObjcInternal.h
│ │ │ ├── FLEXObjcInternal.mm
│ │ │ ├── FLEXRuntimeConstants.h
│ │ │ ├── FLEXRuntimeConstants.m
│ │ │ ├── FLEXRuntimeSafety.h
│ │ │ ├── FLEXRuntimeSafety.m
│ │ │ ├── FLEXSwiftInternal.h
│ │ │ ├── FLEXSwiftInternal.mm
│ │ │ ├── FLEXTypeEncodingParser.h
│ │ │ ├── FLEXTypeEncodingParser.m
│ │ │ └── Reflection
│ │ │ │ ├── FLEXBlockDescription.h
│ │ │ │ ├── FLEXBlockDescription.m
│ │ │ │ ├── FLEXClassBuilder.h
│ │ │ │ ├── FLEXClassBuilder.m
│ │ │ │ ├── FLEXIvar.h
│ │ │ │ ├── FLEXIvar.m
│ │ │ │ ├── FLEXMetadataExtras.h
│ │ │ │ ├── FLEXMetadataExtras.m
│ │ │ │ ├── FLEXMethod.h
│ │ │ │ ├── FLEXMethod.m
│ │ │ │ ├── FLEXMethodBase.h
│ │ │ │ ├── FLEXMethodBase.m
│ │ │ │ ├── FLEXMirror.h
│ │ │ │ ├── FLEXMirror.m
│ │ │ │ ├── FLEXProperty.h
│ │ │ │ ├── FLEXProperty.m
│ │ │ │ ├── FLEXPropertyAttributes.h
│ │ │ │ ├── FLEXPropertyAttributes.m
│ │ │ │ ├── FLEXProtocol.h
│ │ │ │ ├── FLEXProtocol.m
│ │ │ │ ├── FLEXProtocolBuilder.h
│ │ │ │ └── FLEXProtocolBuilder.m
│ │ │ ├── flex_fishhook.c
│ │ │ └── flex_fishhook.h
│ └── ViewHierarchy
│ │ ├── FLEXHierarchyViewController.h
│ │ ├── FLEXHierarchyViewController.m
│ │ ├── FLEXImagePreviewViewController.h
│ │ ├── FLEXImagePreviewViewController.m
│ │ ├── SnapshotExplorer
│ │ ├── FHSRangeSlider.h
│ │ ├── FHSRangeSlider.m
│ │ ├── FHSSnapshotView.h
│ │ ├── FHSSnapshotView.m
│ │ ├── FHSView.h
│ │ ├── FHSView.m
│ │ ├── FHSViewController.h
│ │ ├── FHSViewController.m
│ │ ├── FHSViewSnapshot.h
│ │ ├── FHSViewSnapshot.m
│ │ └── Scene
│ │ │ ├── FHSSnapshotNodes.h
│ │ │ ├── FHSSnapshotNodes.m
│ │ │ ├── SceneKit+Snapshot.h
│ │ │ └── SceneKit+Snapshot.m
│ │ └── TreeExplorer
│ │ ├── FLEXHierarchyTableViewCell.h
│ │ ├── FLEXHierarchyTableViewCell.m
│ │ ├── FLEXHierarchyTableViewController.h
│ │ └── FLEXHierarchyTableViewController.m
├── Example
│ ├── FLEXample-Cocoapods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── FLEXample.xcscheme
│ ├── FLEXample-SPM.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── FLEXample.xcscheme
│ ├── FLEXample
│ │ ├── App
│ │ │ ├── Commit.swift
│ │ │ ├── CommitListViewController.h
│ │ │ ├── CommitListViewController.m
│ │ │ ├── Person.h
│ │ │ └── Person.m
│ │ ├── AppDelegate.swift
│ │ ├── MiscNetworkRequests.h
│ │ ├── MiscNetworkRequests.m
│ │ ├── SceneDelegate.swift
│ │ └── Supporting Files
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ │ ├── Base.lproj
│ │ │ └── LaunchScreen.storyboard
│ │ │ ├── Bundle
│ │ │ ├── dogs.realm
│ │ │ ├── image
│ │ │ ├── image.jpeg
│ │ │ ├── image.jpg
│ │ │ ├── image.png
│ │ │ ├── music_library.db
│ │ │ └── music_library_schema.jpg
│ │ │ ├── FLEXample-Bridging-Header.h
│ │ │ ├── Info.plist
│ │ │ └── Preview Content
│ │ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── Podfile
│ └── Realm
│ │ ├── Dog.h
│ │ ├── Dog.m
│ │ ├── Owner.h
│ │ └── Owner.m
├── FLEX.podspec
├── FLEX.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── FLEX.xcscheme
│ │ └── FLEXTests.xcscheme
├── FLEXTests
│ ├── FLEXTests.m
│ ├── FLEXTestsMethodsList.m
│ ├── FLEXTypeEncodingParserTests.m
│ ├── Info.plist
│ └── Supporting Files
│ │ ├── FLEXNewRootClass.h
│ │ └── FLEXNewRootClass.m
├── Graphics
│ ├── FLEX-Icons.sketch
│ ├── filetypes
│ │ ├── audio.png
│ │ ├── audio@2x.png
│ │ ├── audio@3x.png
│ │ ├── binary.png
│ │ ├── binary@2x.png
│ │ ├── binary@3x.png
│ │ ├── html.png
│ │ ├── html@2x.png
│ │ ├── html@3x.png
│ │ ├── js.png
│ │ ├── js@2x.png
│ │ ├── js@3x.png
│ │ ├── json.png
│ │ ├── json@2x.png
│ │ ├── json@3x.png
│ │ ├── old
│ │ │ ├── audio.pxm
│ │ │ ├── binary.pxm
│ │ │ ├── html.pxm
│ │ │ ├── js.pxm
│ │ │ ├── json.pxm
│ │ │ ├── plist.pxm
│ │ │ ├── text.pxm
│ │ │ ├── textplain.pxm
│ │ │ └── video.pxm
│ │ ├── plist.png
│ │ ├── plist@2x.png
│ │ ├── plist@3x.png
│ │ ├── text.png
│ │ ├── text@2x.png
│ │ ├── text@3x.png
│ │ ├── textplain.png
│ │ ├── textplain@2x.png
│ │ ├── textplain@3x.png
│ │ ├── video.png
│ │ ├── video@2x.png
│ │ ├── video@3x.png
│ │ ├── xml.png
│ │ ├── xml@2x.png
│ │ └── xml@3x.png
│ ├── image_to_code.py
│ ├── images_to_hex.sh
│ ├── iterate_hex_to_pasteboard.sh
│ ├── misc
│ │ ├── bookmarks.png
│ │ ├── bookmarks@2x.png
│ │ ├── bookmarks@3x.png
│ │ ├── checker.png
│ │ ├── checker@2x.png
│ │ ├── checker@3x.png
│ │ ├── gear.png
│ │ ├── gear@2x.png
│ │ ├── gear@3x.png
│ │ ├── more.png
│ │ ├── more@2x.png
│ │ ├── more@3x.png
│ │ ├── scrolldown.png
│ │ ├── scrolldown@2x.png
│ │ ├── scrolldown@3x.png
│ │ ├── tabs.png
│ │ ├── tabs@2x.png
│ │ ├── tabs@3x.png
│ │ ├── toggle2D.png
│ │ ├── toggle2D@2x.png
│ │ ├── toggle2D@3x.png
│ │ ├── toggle3D.png
│ │ ├── toggle3D@2x.png
│ │ └── toggle3D@3x.png
│ ├── range-slider
│ │ ├── fill.png
│ │ ├── fill@2x.png
│ │ ├── fill@3x.png
│ │ ├── left_handle.png
│ │ ├── left_handle@2x.png
│ │ ├── left_handle@3x.png
│ │ ├── right_handle.png
│ │ ├── right_handle@2x.png
│ │ ├── right_handle@3x.png
│ │ ├── track.png
│ │ ├── track@2x.png
│ │ └── track@3x.png
│ └── toolbar
│ │ ├── close.png
│ │ ├── close@2x.png
│ │ ├── close@3x.png
│ │ ├── dragHandle.png
│ │ ├── dragHandle@2x.png
│ │ ├── dragHandle@3x.png
│ │ ├── move.png
│ │ ├── move@2x.png
│ │ ├── move@3x.png
│ │ ├── recent.png
│ │ ├── recent@2x.png
│ │ ├── recent@3x.png
│ │ ├── select.png
│ │ ├── select@2x.png
│ │ ├── select@3x.png
│ │ ├── views.png
│ │ ├── views@2x.png
│ │ ├── views@3x.png
│ │ ├── wrench.png
│ │ ├── wrench@2x.png
│ │ └── wrench@3x.png
├── LICENSE
├── Package.swift
├── README.md
└── generate-spm-headers.sh
├── LatestBuild
├── README.md
├── TikTok.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcshareddata
│ └── xcschemes
│ └── TikTok.xcscheme
├── TikTok
├── Config
│ └── MDConfig.plist
├── Info.plist
├── Scripts
│ └── quick-resign.sh
├── TargetApp
│ └── put ipa or app here
└── icon.png
├── TikTokDylib
├── AntiAntiDebug
│ └── AntiAntiDebug.m
├── Config
│ ├── MDConfigManager.h
│ ├── MDConfigManager.m
│ ├── MDCycriptManager.h
│ ├── MDCycriptManager.m
│ ├── MDMethodTrace.h
│ └── MDMethodTrace.m
├── Headers
│ ├── AwemeTTHttpTask.h
│ ├── TikTokHeaders.h
│ └── TikTokSettingsHeaders.h
├── Logos
│ ├── TikTokDylib.mm
│ └── TikTokDylib.xm
├── Source
│ ├── Common
│ │ ├── Logger.swift
│ │ ├── MBProgressHUD+XYHUD.h
│ │ ├── MBProgressHUD+XYHUD.m
│ │ ├── MBProgressHUD.h
│ │ ├── MBProgressHUD.m
│ │ ├── MediaExportSession.swift
│ │ ├── UIApplication+Extensions.swift
│ │ ├── UIDebuggingTool.h
│ │ ├── UIDebuggingTool.m
│ │ └── VideoDownloader.swift
│ ├── Resource
│ │ ├── countryCode.plist
│ │ ├── iconPersonalSettingArrow_18x18_@2x.png
│ │ ├── icon_discovery_favi@2x.png
│ │ └── icon_discovery_favi@3x.png
│ └── Settings
│ │ ├── Carrier.swift
│ │ ├── SettingsCell.swift
│ │ ├── SettingsSection.swift
│ │ ├── SettingsViewController.swift
│ │ ├── TikTokDylib-Bridging-Header.h
│ │ └── XYPreferenceManager.swift
├── TikTokDylib-Prefix.pch
├── TikTokDylib.h
├── TikTokDylib.m
├── Tools
│ ├── LLDBTools.h
│ └── LLDBTools.mm
├── Trace
│ ├── OCMethodTrace.h
│ ├── OCMethodTrace.m
│ ├── OCSelectorTrampolines.h
│ ├── OCSelectorTrampolines.mm
│ ├── a1a2-selectortramps-arm.s
│ ├── a1a2-selectortramps-arm64.s
│ ├── a1a2-selectortramps-i386.s
│ ├── a1a2-selectortramps-x86_64.s
│ ├── a2a3-selectortramps-arm.s
│ ├── a2a3-selectortramps-i386.s
│ ├── a2a3-selectortramps-x86_64.s
│ └── selectortramps.mac
└── fishhook
│ ├── fishhook.c
│ └── fishhook.h
└── manifest.plist
/FLEX/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | BasedOnStyle: WebKit
3 | AccessModifierOffset: -2
4 | AlignEscapedNewlinesLeft: false
5 | AlignTrailingComments: true
6 | AllowAllParametersOfDeclarationOnNextLine: false
7 | AllowShortIfStatementsOnASingleLine: false
8 | AllowShortLoopsOnASingleLine: false
9 | AlwaysBreakBeforeMultilineStrings: false
10 | AlwaysBreakTemplateDeclarations: false
11 | BinPackParameters: true
12 | BreakBeforeBinaryOperators: false
13 | BreakBeforeBraces: Linux
14 | BreakBeforeTernaryOperators: true
15 | BreakConstructorInitializersBeforeComma: false
16 | ColumnLimit: 0
17 | ConstructorInitializerAllOnOneLineOrOnePerLine: true
18 | ConstructorInitializerIndentWidth: 4
19 | ContinuationIndentWidth: 4
20 | Cpp11BracedListStyle: true
21 | DerivePointerBinding: false
22 | ExperimentalAutoDetectBinPacking: false
23 | IndentCaseLabels: true
24 | IndentFunctionDeclarationAfterType: false
25 | IndentWidth: 4
26 | MaxEmptyLinesToKeep: 3
27 | NamespaceIndentation: None
28 | ObjCSpaceBeforeProtocolList: true
29 | PenaltyBreakBeforeFirstCallParameter: 19
30 | PenaltyBreakComment: 60
31 | PenaltyBreakFirstLessLess: 120
32 | PenaltyBreakString: 1000
33 | PenaltyExcessCharacter: 1000000
34 | PenaltyReturnTypeOnItsOwnLine: 60
35 | PointerBindsToType: false
36 | SpaceAfterControlStatementKeyword: true
37 | SpaceBeforeAssignmentOperators: true
38 | SpaceInEmptyParentheses: false
39 | SpacesBeforeTrailingComments: 1
40 | SpacesInAngles: false
41 | SpacesInCStyleCastParentheses: false
42 | SpacesInParentheses: false
43 | Standard: Auto
44 | TabWidth: 4
45 | UseTab: Never
46 |
47 | ...
48 |
--------------------------------------------------------------------------------
/FLEX/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [NSExceptional]
4 |
--------------------------------------------------------------------------------
/FLEX/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Report a bug in FLEX
4 | title: ''
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | ### Environment
11 | - Platform+version: **iOS 14**
12 | - FLEX version: **9.9.9**
13 |
14 |
15 | ### Bug Report
16 |
17 | Here, you can provide a description of the bug. Some tips:
18 |
19 | - Please do not paste an entire crash log. Upload the crash log to something like [ghostbin.co](https://ghostbin.co/) or another paste service. Alternatively, you can cut out the relevant stack trace and paste that inside a ` ```code block``` `
20 | - If the bug is more complex than "this button is broken" or a crash, consider including a sample project. For example, if your app's requests aren't showing up in the network history page.
21 | - Providing steps to reproduce is always helpful!
22 | - If you want to include a screenshot or GIF, consider modifying the default markdown for uploaded images to use this code to make the image smaller on desktop:
23 | ```
24 |
25 | ```
26 |
27 | This template is a suggestion. You may format your issue however you want, but generally you should at least include your iOS version and FLEX version.
28 |
--------------------------------------------------------------------------------
/FLEX/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest a new feature for FLEX
4 | title: ''
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 |
11 |
--------------------------------------------------------------------------------
/FLEX/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 | .DS_Store
20 | /Example/Pods
21 | Podfile.lock
22 | IDEWorkspaceChecks.plist
23 | *.xcworkspace
24 | .build
25 |
--------------------------------------------------------------------------------
/FLEX/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | xcode_workspace: FLEX.xcworkspace
3 | xcode_sdk: iphonesimulator
4 | before_install:
5 | - gem install xcpretty
6 | matrix:
7 | include:
8 | - xcode_scheme: UICatalog
9 | - xcode_scheme: FLEX
10 | script:
11 | - set -o pipefail
12 | - xcodebuild -workspace $TRAVIS_XCODE_WORKSPACE -scheme $TRAVIS_XCODE_SCHEME -sdk $TRAVIS_XCODE_SDK build | xcpretty
--------------------------------------------------------------------------------
/FLEX/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "search.exclude": {
3 | "Classes/Headers": true
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/FLEX/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to FLEX #
2 |
3 | We welcome contributions! Please open a pull request with your changes.
4 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Controllers/FLEXNavigationController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNavigationController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 1/30/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FLEXNavigationController : UINavigationController
14 |
15 | + (instancetype)withRootViewController:(UIViewController *)rootVC;
16 |
17 | @end
18 |
19 | @interface UINavigationController (FLEXObjectExploring)
20 |
21 | /// Push an object explorer view controller onto the navigation stack
22 | - (void)pushExplorerForObject:(id)object;
23 | /// Push an object explorer view controller onto the navigation stack
24 | - (void)pushExplorerForObject:(id)object animated:(BOOL)animated;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/FLEXSingleRowSection.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSingleRowSection.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 9/25/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewSection.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// A section providing a specific single row.
14 | ///
15 | /// You may optionally provide a view controller to push when the row
16 | /// is selected, or an action to perform when it is selected.
17 | /// Which one is used first is up to the table view data source.
18 | @interface FLEXSingleRowSection : FLEXTableViewSection
19 |
20 | /// @param reuseIdentifier if nil, kFLEXDefaultCell is used.
21 | + (instancetype)title:(nullable NSString *)sectionTitle
22 | reuse:(nullable NSString *)reuseIdentifier
23 | cell:(void(^)(__kindof UITableViewCell *cell))cellConfiguration;
24 |
25 | @property (nullable, nonatomic) UIViewController *pushOnSelection;
26 | @property (nullable, nonatomic) void (^selectionAction)(UIViewController *host);
27 | /// Called to determine whether the single row should display itself or not.
28 | @property (nonatomic) BOOL (^filterMatcher)(NSString *filterText);
29 |
30 | @end
31 |
32 | NS_ASSUME_NONNULL_END
33 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Carousel/FLEXCarouselCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXCarouselCell.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 7/17/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXCarouselCell : UICollectionViewCell
12 |
13 | @property (nonatomic, copy) NSString *title;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Carousel/FLEXScopeCarousel.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXScopeCarousel.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 7/17/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// Only use on iOS 10 and up. Requires iOS 10 APIs for calculating row sizes.
12 | @interface FLEXScopeCarousel : UIControl
13 |
14 | @property (nonatomic, copy) NSArray *items;
15 | @property (nonatomic) NSInteger selectedIndex;
16 | @property (nonatomic) void(^selectedIndexChangedAction)(NSInteger idx);
17 |
18 | - (void)registerBlockForDynamicTypeChanges:(void(^)(FLEXScopeCarousel *))handler;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXCodeFontCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXCodeFontCell.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 12/27/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXMultilineTableViewCell.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FLEXCodeFontCell : FLEXMultilineDetailTableViewCell
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXCodeFontCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXCodeFontCell.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 12/27/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXCodeFontCell.h"
10 | #import "UIFont+FLEX.h"
11 |
12 | @implementation FLEXCodeFontCell
13 |
14 | - (void)postInit {
15 | [super postInit];
16 |
17 | self.titleLabel.font = UIFont.flex_codeFont;
18 | self.subtitleLabel.font = UIFont.flex_codeFont;
19 |
20 | self.titleLabel.adjustsFontSizeToFitWidth = YES;
21 | self.titleLabel.minimumScaleFactor = 0.9;
22 | self.subtitleLabel.adjustsFontSizeToFitWidth = YES;
23 | self.subtitleLabel.minimumScaleFactor = 0.75;
24 |
25 | // Disable mutli-line pre iOS 11
26 | if (@available(iOS 11, *)) {
27 | self.subtitleLabel.numberOfLines = 5;
28 | } else {
29 | self.titleLabel.numberOfLines = 1;
30 | self.subtitleLabel.numberOfLines = 1;
31 | }
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXKeyValueTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeyValueTableViewCell.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/23/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewCell.h"
10 |
11 | @interface FLEXKeyValueTableViewCell : FLEXTableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXKeyValueTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeyValueTableViewCell.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/23/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXKeyValueTableViewCell.h"
10 |
11 | @implementation FLEXKeyValueTableViewCell
12 |
13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
14 | return [super initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentifier];
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXMultilineTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMultilineTableViewCell.h
3 | // FLEX
4 | //
5 | // Created by Ryan Olson on 2/13/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewCell.h"
10 |
11 | /// A cell with both labels set to be multi-line capable.
12 | @interface FLEXMultilineTableViewCell : FLEXTableViewCell
13 |
14 | + (CGFloat)preferredHeightWithAttributedText:(NSAttributedString *)attributedText
15 | maxWidth:(CGFloat)contentViewWidth
16 | style:(UITableViewStyle)style
17 | showsAccessory:(BOOL)showsAccessory;
18 |
19 | @end
20 |
21 | /// A \c FLEXMultilineTableViewCell initialized with \c UITableViewCellStyleSubtitle
22 | @interface FLEXMultilineDetailTableViewCell : FLEXMultilineTableViewCell
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXSubtitleTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSubtitleTableViewCell.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 4/17/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewCell.h"
10 |
11 | /// A cell initialized with \c UITableViewCellStyleSubtitle
12 | @interface FLEXSubtitleTableViewCell : FLEXTableViewCell
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXSubtitleTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSubtitleTableViewCell.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 4/17/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXSubtitleTableViewCell.h"
10 |
11 | @implementation FLEXSubtitleTableViewCell
12 |
13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
14 | return [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier];
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/Core/Views/Cells/FLEXTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXTableViewCell.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 4/17/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXTableViewCell : UITableViewCell
12 |
13 | /// Use this instead of .textLabel
14 | @property (nonatomic, readonly) UILabel *titleLabel;
15 | /// Use this instead of .detailTextLabel
16 | @property (nonatomic, readonly) UILabel *subtitleLabel;
17 |
18 | /// Subclasses can override this instead of initializers to
19 | /// perform additional initialization without lots of boilerplate.
20 | /// Remember to call super!
21 | - (void)postInit;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputColorView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputColorView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/30/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputView.h"
10 |
11 | @interface FLEXArgumentInputColorView : FLEXArgumentInputView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputDateView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputDataView.h
3 | // Flipboard
4 | //
5 | // Created by Daniel Rodriguez Troitino on 2/14/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputView.h"
10 |
11 | @interface FLEXArgumentInputDateView : FLEXArgumentInputView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputFontView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/28/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputView.h"
10 |
11 | @interface FLEXArgumentInputFontView : FLEXArgumentInputView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontsPickerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputFontsPickerView.h
3 | // FLEX
4 | //
5 | // Created by 啟倫 陳 on 2014/7/27.
6 | // Copyright (c) 2014年 f. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputTextView.h"
10 |
11 | @interface FLEXArgumentInputFontsPickerView : FLEXArgumentInputTextView
12 | @end
13 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputNotSupportedView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputNotSupportedView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/18/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputTextView.h"
10 |
11 | @interface FLEXArgumentInputNotSupportedView : FLEXArgumentInputTextView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputNotSupportedView.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputNotSupportedView.m
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/18/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputNotSupportedView.h"
10 | #import "FLEXColor.h"
11 |
12 | @implementation FLEXArgumentInputNotSupportedView
13 |
14 | - (instancetype)initWithArgumentTypeEncoding:(const char *)typeEncoding {
15 | self = [super initWithArgumentTypeEncoding:typeEncoding];
16 | if (self) {
17 | self.inputTextView.userInteractionEnabled = NO;
18 | self.inputTextView.backgroundColor = [FLEXColor secondaryGroupedBackgroundColorWithAlpha:0.5];
19 | self.inputPlaceholderText = @"nil (type not supported)";
20 | self.targetSize = FLEXArgumentInputViewSizeSmall;
21 | }
22 | return self;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputNumberView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputNumberView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/15/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputTextView.h"
10 |
11 | @interface FLEXArgumentInputNumberView : FLEXArgumentInputTextView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputObjectView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputObjectView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/15/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputTextView.h"
10 |
11 | @interface FLEXArgumentInputObjectView : FLEXArgumentInputTextView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputStringView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputStringView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/28/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputTextView.h"
10 |
11 | @interface FLEXArgumentInputStringView : FLEXArgumentInputTextView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputStructView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputStructView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/16/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputView.h"
10 |
11 | @interface FLEXArgumentInputStructView : FLEXArgumentInputView
12 |
13 | /// Enable displaying ivar names for custom struct types
14 | + (void)registerFieldNames:(NSArray *)names forTypeEncoding:(NSString *)typeEncoding;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputSwitchView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputSwitchView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/16/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXArgumentInputView.h"
10 |
11 | @interface FLEXArgumentInputSwitchView : FLEXArgumentInputView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputTextView.h
3 | // FLEXInjected
4 | //
5 | // Created by Ryan Olson on 6/15/14.
6 | //
7 | //
8 |
9 | #import "FLEXArgumentInputView.h"
10 |
11 | @interface FLEXArgumentInputTextView : FLEXArgumentInputView
12 |
13 | // For subclass eyes only
14 |
15 | @property (nonatomic, readonly) UITextView *inputTextView;
16 | @property (nonatomic) NSString *inputPlaceholderText;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/FLEXArgumentInputViewFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXArgumentInputViewFactory.h
3 | // FLEXInjected
4 | //
5 | // Created by Ryan Olson on 6/15/14.
6 | //
7 | //
8 |
9 | #import
10 | #import "FLEXArgumentInputSwitchView.h"
11 |
12 | @interface FLEXArgumentInputViewFactory : NSObject
13 |
14 | /// Forwards to argumentInputViewForTypeEncoding:currentValue: with a nil currentValue.
15 | + (FLEXArgumentInputView *)argumentInputViewForTypeEncoding:(const char *)typeEncoding;
16 |
17 | /// The main factory method for making argument input view subclasses that are the best fit for the type.
18 | + (FLEXArgumentInputView *)argumentInputViewForTypeEncoding:(const char *)typeEncoding currentValue:(id)currentValue;
19 |
20 | /// A way to check if we should try editing a filed given its type encoding and value.
21 | /// Useful when deciding whether to edit or explore a property, ivar, or NSUserDefaults value.
22 | + (BOOL)canEditFieldWithTypeEncoding:(const char *)typeEncoding currentValue:(id)currentValue;
23 |
24 | /// Enable displaying ivar names for custom struct types
25 | + (void)registerFieldNames:(NSArray *)names forTypeEncoding:(NSString *)typeEncoding;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/FLEXDefaultEditorViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXDefaultEditorViewController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 5/23/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXFieldEditorViewController.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FLEXDefaultEditorViewController : FLEXVariableEditorViewController
14 |
15 | + (instancetype)target:(NSUserDefaults *)defaults key:(NSString *)key commitHandler:(void(^_Nullable)(void))onCommit;
16 |
17 | + (BOOL)canEditDefaultWithValue:(nullable id)currentValue;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/FLEXFieldEditorView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXFieldEditorView.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 5/16/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class FLEXArgumentInputView;
12 |
13 | @interface FLEXFieldEditorView : UIView
14 |
15 | @property (nonatomic, copy) NSString *targetDescription;
16 | @property (nonatomic, copy) NSString *fieldDescription;
17 |
18 | @property (nonatomic, copy) NSArray *argumentInputViews;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/FLEXFieldEditorViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXFieldEditorViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 11/22/18.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXVariableEditorViewController.h"
10 | #import "FLEXProperty.h"
11 | #import "FLEXIvar.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface FLEXFieldEditorViewController : FLEXVariableEditorViewController
16 |
17 | /// @return nil if the property is readonly or if the type is unsupported
18 | + (nullable instancetype)target:(id)target property:(FLEXProperty *)property commitHandler:(void(^_Nullable)(void))onCommit;
19 | /// @return nil if the ivar type is unsupported
20 | + (nullable instancetype)target:(id)target ivar:(FLEXIvar *)ivar commitHandler:(void(^_Nullable)(void))onCommit;
21 |
22 | /// Subclasses can change the button title via the \c title property
23 | @property (nonatomic, readonly) UIBarButtonItem *getterButton;
24 |
25 | - (void)getterButtonPressed:(id)sender;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/FLEX/Classes/Editing/FLEXMethodCallingViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMethodCallingViewController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 5/23/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXVariableEditorViewController.h"
10 | #import "FLEXMethod.h"
11 |
12 | @interface FLEXMethodCallingViewController : FLEXVariableEditorViewController
13 |
14 | + (instancetype)target:(id)target method:(FLEXMethod *)method;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/FLEX/Classes/ExplorerInterface/Bookmarks/FLEXBookmarkManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXBookmarkManager.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/6/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FLEXBookmarkManager : NSObject
14 |
15 | @property (nonatomic, readonly, class) NSMutableArray *bookmarks;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/ExplorerInterface/Bookmarks/FLEXBookmarkManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXBookmarkManager.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/6/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXBookmarkManager.h"
10 |
11 | static NSMutableArray *kFLEXBookmarkManagerBookmarks = nil;
12 |
13 | @implementation FLEXBookmarkManager
14 |
15 | + (void)initialize {
16 | if (self == [FLEXBookmarkManager class]) {
17 | kFLEXBookmarkManagerBookmarks = [NSMutableArray new];
18 | }
19 | }
20 |
21 | + (NSMutableArray *)bookmarks {
22 | return kFLEXBookmarkManagerBookmarks;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/FLEX/Classes/ExplorerInterface/Bookmarks/FLEXBookmarksViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXBookmarksViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/6/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FLEXBookmarksViewController : FLEXTableViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/ExplorerInterface/FLEXViewControllersViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXViewControllersViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 2/13/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXFilteringTableViewController.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FLEXViewControllersViewController : FLEXFilteringTableViewController
14 |
15 | + (instancetype)controllersForViews:(NSArray *)views;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/ExplorerInterface/FLEXWindow.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXWindow.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 4/13/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol FLEXWindowEventDelegate
12 |
13 | - (BOOL)shouldHandleTouchAtPoint:(CGPoint)pointInWindow;
14 | - (BOOL)canBecomeKeyWindow;
15 |
16 | @end
17 |
18 | #pragma mark -
19 | @interface FLEXWindow : UIWindow
20 |
21 | @property (nonatomic, weak) id eventDelegate;
22 |
23 | /// Tracked so we can restore the key window after dismissing a modal.
24 | /// We need to become key after modal presentation so we can correctly capture input.
25 | /// If we're just showing the toolbar, we want the main app's window to remain key
26 | /// so that we don't interfere with input, status bar, etc.
27 | @property (nonatomic, readonly) UIWindow *previousKeyWindow;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/FLEX/Classes/ExplorerInterface/FLEXWindowManagerController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXWindowManagerController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/6/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FLEXWindowManagerController : FLEXTableViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/ExplorerInterface/Tabs/FLEXTabsViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXTabsViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/4/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 |
11 | @interface FLEXTabsViewController : FLEXTableViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/FLEX-Categories.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEX-Categories.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/12/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "UIBarButtonItem+FLEX.h"
10 | #import "CALayer+FLEX.h"
11 | #import "UIFont+FLEX.h"
12 | #import "UIGestureRecognizer+Blocks.h"
13 | #import "UIPasteboard+FLEX.h"
14 | #import "UIMenu+FLEX.h"
15 | #import "UITextField+Range.h"
16 |
17 | #import "NSObject+FLEX_Reflection.h"
18 | #import "NSArray+FLEX.h"
19 | #import "NSUserDefaults+FLEX.h"
20 | #import "NSTimer+FLEX.h"
21 | #import "NSDateFormatter+FLEX.h"
22 |
--------------------------------------------------------------------------------
/FLEX/Classes/FLEX-Core.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEX-Core.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/11/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXFilteringTableViewController.h"
10 | #import "FLEXNavigationController.h"
11 | #import "FLEXTableViewController.h"
12 | #import "FLEXTableView.h"
13 |
14 | #import "FLEXSingleRowSection.h"
15 | #import "FLEXTableViewSection.h"
16 |
17 | #import "FLEXCodeFontCell.h"
18 | #import "FLEXSubtitleTableViewCell.h"
19 | #import "FLEXTableViewCell.h"
20 | #import "FLEXMultilineTableViewCell.h"
21 | #import "FLEXKeyValueTableViewCell.h"
22 |
23 |
--------------------------------------------------------------------------------
/FLEX/Classes/FLEX-ObjectExploring.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEX-ObjectExploring.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/11/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXObjectExplorerFactory.h"
10 | #import "FLEXObjectExplorerViewController.h"
11 |
12 | #import "FLEXObjectExplorer.h"
13 |
14 | #import "FLEXShortcut.h"
15 | #import "FLEXShortcutsSection.h"
16 |
17 | #import "FLEXCollectionContentSection.h"
18 | #import "FLEXColorPreviewSection.h"
19 | #import "FLEXDefaultsContentSection.h"
20 | #import "FLEXMetadataSection.h"
21 | #import "FLEXMutableListSection.h"
22 | #import "FLEXObjectInfoSection.h"
23 |
--------------------------------------------------------------------------------
/FLEX/Classes/FLEX-Runtime.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEX-Runtime.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/11/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXObjcInternal.h"
10 | #import "FLEXSwiftInternal.h"
11 | #import "FLEXRuntimeSafety.h"
12 | #import "FLEXBlockDescription.h"
13 | #import "FLEXTypeEncodingParser.h"
14 |
15 | #import "FLEXMirror.h"
16 | #import "FLEXProtocol.h"
17 | #import "FLEXProperty.h"
18 | #import "FLEXIvar.h"
19 | #import "FLEXMethodBase.h"
20 | #import "FLEXMethod.h"
21 | #import "FLEXPropertyAttributes.h"
22 | #import "FLEXRuntime+Compare.h"
23 | #import "FLEXRuntime+UIKitHelpers.h"
24 | #import "FLEXMetadataExtras.h"
25 |
26 | #import "FLEXProtocolBuilder.h"
27 | #import "FLEXClassBuilder.h"
28 |
--------------------------------------------------------------------------------
/FLEX/Classes/FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEX.h
3 | // FLEX
4 | //
5 | // Created by Eric Horacek on 7/18/15.
6 | // Modified by Tanner Bennett on 3/12/20.
7 | // Copyright (c) 2020 FLEX Team. All rights reserved.
8 | //
9 |
10 | #import "FLEXManager.h"
11 | #import "FLEXManager+Extensibility.h"
12 | #import "FLEXManager+Networking.h"
13 |
14 | #import "FLEXExplorerToolbar.h"
15 | #import "FLEXExplorerToolbarItem.h"
16 | #import "FLEXGlobalsEntry.h"
17 |
18 | #import "FLEX-Core.h"
19 | #import "FLEX-Runtime.h"
20 | #import "FLEX-Categories.h"
21 | #import "FLEX-ObjectExploring.h"
22 |
23 | #import "FLEXMacros.h"
24 | #import "FLEXAlert.h"
25 | #import "FLEXResources.h"
26 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDBQueryRowCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXDBQueryRowCell.h
3 | // FLEX
4 | //
5 | // Created by Peng Tao on 15/11/24.
6 | // Copyright © 2015年 f. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class FLEXDBQueryRowCell;
12 |
13 | extern NSString * const kFLEXDBQueryRowCellReuse;
14 |
15 | @protocol FLEXDBQueryRowCellLayoutSource
16 |
17 | - (CGFloat)dbQueryRowCell:(FLEXDBQueryRowCell *)dbQueryRowCell minXForColumn:(NSUInteger)column;
18 | - (CGFloat)dbQueryRowCell:(FLEXDBQueryRowCell *)dbQueryRowCell widthForColumn:(NSUInteger)column;
19 |
20 | @end
21 |
22 | @interface FLEXDBQueryRowCell : UITableViewCell
23 |
24 | /// An array of NSString, NSNumber, or NSData objects
25 | @property (nonatomic) NSArray *data;
26 | @property (nonatomic, weak) id layoutSource;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDatabaseManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // PTDatabaseManager.h
3 | // Derived from:
4 | //
5 | // FMDatabase.h
6 | // FMDB( https://github.com/ccgus/fmdb )
7 | //
8 | // Created by Peng Tao on 15/11/23.
9 | //
10 | // Licensed to Flying Meat Inc. under one or more contributor license agreements.
11 | // See the LICENSE file distributed with this work for the terms under
12 | // which Flying Meat Inc. licenses this file to you.
13 |
14 | #import
15 | #import "FLEXSQLResult.h"
16 |
17 | /// Conformers should automatically open and close the database
18 | @protocol FLEXDatabaseManager
19 |
20 | @required
21 |
22 | /// @return \c nil if the database couldn't be opened
23 | + (instancetype)managerForDatabase:(NSString *)path;
24 |
25 | /// @return a list of all table names
26 | - (NSArray *)queryAllTables;
27 | - (NSArray *)queryAllColumnsOfTable:(NSString *)tableName;
28 | - (NSArray *)queryAllDataInTable:(NSString *)tableName;
29 |
30 | @optional
31 |
32 | - (NSArray *)queryRowIDsInTable:(NSString *)tableName;
33 | - (FLEXSQLResult *)executeStatement:(NSString *)SQLStatement;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDatabaseManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRealmDatabaseManager.h
3 | // FLEX
4 | //
5 | // Created by Tim Oliver on 28/01/2016.
6 | // Copyright © 2016 Realm. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FLEXDatabaseManager.h"
11 |
12 | @interface FLEXRealmDatabaseManager : NSObject
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDefines.h:
--------------------------------------------------------------------------------
1 | //
2 | // Realm.h
3 | // FLEX
4 | //
5 | // Created by Tim Oliver on 16/02/2016.
6 | // Copyright © 2016 Realm. All rights reserved.
7 | //
8 |
9 | #if __has_include()
10 | #else
11 |
12 | @class RLMObject, RLMResults, RLMRealm, RLMRealmConfiguration, RLMSchema, RLMObjectSchema, RLMProperty;
13 |
14 | @interface RLMRealmConfiguration : NSObject
15 | @property (nonatomic, copy) NSURL *fileURL;
16 | @end
17 |
18 | @interface RLMRealm : NSObject
19 | @property (nonatomic, readonly) RLMSchema *schema;
20 | + (RLMRealm *)realmWithConfiguration:(RLMRealmConfiguration *)configuration error:(NSError **)error;
21 | - (RLMResults *)allObjects:(NSString *)className;
22 | @end
23 |
24 | @interface RLMSchema : NSObject
25 | @property (nonatomic, readonly) NSArray *objectSchema;
26 | - (RLMObjectSchema *)schemaForClassName:(NSString *)className;
27 | @end
28 |
29 | @interface RLMObjectSchema : NSObject
30 | @property (nonatomic, readonly) NSString *className;
31 | @property (nonatomic, readonly) NSArray *properties;
32 | @end
33 |
34 | @interface RLMProperty : NSString
35 | @property (nonatomic, readonly) NSString *name;
36 | @end
37 |
38 | @interface RLMResults : NSObject
39 | @property (nonatomic, readonly) NSInteger count;
40 | @end
41 |
42 | @interface RLMObject : NSObject
43 |
44 | @end
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXSQLiteDatabaseManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // PTDatabaseManager.h
3 | // Derived from:
4 | //
5 | // FMDatabase.h
6 | // FMDB( https://github.com/ccgus/fmdb )
7 | //
8 | // Created by Peng Tao on 15/11/23.
9 | //
10 | // Licensed to Flying Meat Inc. under one or more contributor license agreements.
11 | // See the LICENSE file distributed with this work for the terms under
12 | // which Flying Meat Inc. licenses this file to you.
13 |
14 | #import
15 | #import "FLEXDatabaseManager.h"
16 | #import "FLEXSQLResult.h"
17 |
18 | @interface FLEXSQLiteDatabaseManager : NSObject
19 |
20 | /// Contains the result of the last operation, which may be an error
21 | @property (nonatomic, readonly) FLEXSQLResult *lastResult;
22 | /// Calls into \c sqlite3_last_insert_rowid()
23 | @property (nonatomic, readonly) NSInteger lastRowID;
24 |
25 | /// Given a statement like 'SELECT * from @table where @col = @val' and arguments
26 | /// like { @"table": @"Album", @"col": @"year", @"val" @1 } this method will
27 | /// invoke the statement and properly bind the given arguments to the statement.
28 | ///
29 | /// You may pass NSStrings, NSData, NSNumbers, or NSNulls as values.
30 | - (FLEXSQLResult *)executeStatement:(NSString *)statement arguments:(NSDictionary *)args;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableColumnHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXTableContentHeaderCell.h
3 | // FLEX
4 | //
5 | // Created by Peng Tao on 15/11/26.
6 | // Copyright © 2015年 f. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSUInteger, FLEXTableColumnHeaderSortType) {
12 | FLEXTableColumnHeaderSortTypeNone = 0,
13 | FLEXTableColumnHeaderSortTypeAsc,
14 | FLEXTableColumnHeaderSortTypeDesc,
15 | };
16 |
17 | NS_INLINE FLEXTableColumnHeaderSortType FLEXNextTableColumnHeaderSortType(
18 | FLEXTableColumnHeaderSortType current) {
19 | switch (current) {
20 | case FLEXTableColumnHeaderSortTypeAsc:
21 | return FLEXTableColumnHeaderSortTypeDesc;
22 | case FLEXTableColumnHeaderSortTypeNone:
23 | case FLEXTableColumnHeaderSortTypeDesc:
24 | return FLEXTableColumnHeaderSortTypeAsc;
25 | }
26 |
27 | return FLEXTableColumnHeaderSortTypeNone;
28 | }
29 |
30 | @interface FLEXTableColumnHeader : UIView
31 |
32 | @property (nonatomic) NSInteger index;
33 | @property (nonatomic, readonly) UILabel *titleLabel;
34 |
35 | @property (nonatomic) FLEXTableColumnHeaderSortType sortType;
36 |
37 | @end
38 |
39 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableContentViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // PTTableContentViewController.h
3 | // PTDatabaseReader
4 | //
5 | // Created by Peng Tao on 15/11/23.
6 | // Copyright © 2015年 Peng Tao. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FLEXDatabaseManager.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface FLEXTableContentViewController : UIViewController
15 |
16 | /// Display a mutable table with the given columns, rows, and name.
17 | ///
18 | /// @param columnNames self explanatory.
19 | /// @param rowData an array of rows, where each row is an array of column data.
20 | /// @param rowIDs an array of stringy row IDs. Required for deleting rows.
21 | /// @param tableName an optional name of the table being viewed, if any. Enables adding rows.
22 | /// @param databaseManager an optional manager to allow modifying the table.
23 | /// Required for deleting rows. Required for adding rows if \c tableName is supplied.
24 | + (instancetype)columns:(NSArray *)columnNames
25 | rows:(NSArray *> *)rowData
26 | rowIDs:(NSArray *)rowIDs
27 | tableName:(NSString *)tableName
28 | database:(id)databaseManager;
29 |
30 | /// Display an immutable table with the given columns and rows.
31 | + (instancetype)columns:(NSArray *)columnNames
32 | rows:(NSArray *> *)rowData;
33 |
34 | @end
35 |
36 | NS_ASSUME_NONNULL_END
37 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableLeftCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXTableLeftCell.h
3 | // FLEX
4 | //
5 | // Created by Peng Tao on 15/11/24.
6 | // Copyright © 2015年 f. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXTableLeftCell : UITableViewCell
12 |
13 | @property (nonatomic) UILabel *titlelabel;
14 |
15 | + (instancetype)cellWithTableView:(UITableView *)tableView;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableLeftCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXTableLeftCell.m
3 | // FLEX
4 | //
5 | // Created by Peng Tao on 15/11/24.
6 | // Copyright © 2015年 f. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableLeftCell.h"
10 |
11 | @implementation FLEXTableLeftCell
12 |
13 | + (instancetype)cellWithTableView:(UITableView *)tableView {
14 | static NSString *identifier = @"FLEXTableLeftCell";
15 | FLEXTableLeftCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
16 |
17 | if (!cell) {
18 | cell = [[FLEXTableLeftCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
19 | UILabel *textLabel = [UILabel new];
20 | textLabel.textAlignment = NSTextAlignmentCenter;
21 | textLabel.font = [UIFont systemFontOfSize:13.0];
22 | [cell.contentView addSubview:textLabel];
23 | cell.titlelabel = textLabel;
24 | }
25 |
26 | return cell;
27 | }
28 |
29 | - (void)layoutSubviews {
30 | [super layoutSubviews];
31 | self.titlelabel.frame = self.contentView.frame;
32 | }
33 | @end
34 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // PTTableListViewController.h
3 | // PTDatabaseReader
4 | //
5 | // Created by Peng Tao on 15/11/23.
6 | // Copyright © 2015年 Peng Tao. All rights reserved.
7 | //
8 |
9 | #import "FLEXFilteringTableViewController.h"
10 |
11 | @interface FLEXTableListViewController : FLEXFilteringTableViewController
12 |
13 | + (BOOL)supportsExtension:(NSString *)extension;
14 | - (instancetype)initWithPath:(NSString *)path;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableRowDataViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXTableRowDataViewController.h
3 | // FLEX
4 | //
5 | // Created by Chaoshuai Lu on 7/8/20.
6 | //
7 |
8 | #import "FLEXFilteringTableViewController.h"
9 |
10 | @interface FLEXTableRowDataViewController : FLEXFilteringTableViewController
11 |
12 | + (instancetype)rows:(NSDictionary *)rowData;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/DatabaseBrowser/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | FMDB
3 | Copyright (c) 2008-2014 Flying Meat Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FLEXAPNSViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXAPNSViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 6/28/22.
6 | // Copyright © 2022 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXGlobalsEntry.h"
10 | #import "FLEXFilteringTableViewController.h"
11 |
12 | @interface FLEXAPNSViewController : FLEXFilteringTableViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FLEXAddressExplorerCoordinator.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXAddressExplorerCoordinator.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 7/10/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXGlobalsEntry.h"
10 |
11 | @interface FLEXAddressExplorerCoordinator : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FLEXCookiesViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXCookiesViewController.h
3 | // FLEX
4 | //
5 | // Created by Rich Robinson on 19/10/2015.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXGlobalsEntry.h"
10 | #import "FLEXFilteringTableViewController.h"
11 |
12 | @interface FLEXCookiesViewController : FLEXFilteringTableViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FLEXLiveObjectsController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXLiveObjectsController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 5/28/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 | #import "FLEXGlobalsEntry.h"
11 |
12 | @interface FLEXLiveObjectsController : FLEXTableViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FLEXObjectListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXObjectListViewController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 5/28/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXFilteringTableViewController.h"
10 |
11 | @interface FLEXObjectListViewController : FLEXFilteringTableViewController
12 |
13 | /// This will either return a list of the instances, or take you straight
14 | /// to the explorer itself if there is only one instance.
15 | + (UIViewController *)instancesOfClassWithName:(NSString *)className retained:(BOOL)retain;
16 | + (instancetype)subclassesOfClassWithName:(NSString *)className;
17 | + (instancetype)objectsWithReferencesToObject:(id)object retained:(BOOL)retain;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FLEXWebViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXWebViewController.m
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/10/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXWebViewController : UIViewController
12 |
13 | - (id)initWithURL:(NSURL *)url;
14 | - (id)initWithText:(NSString *)text;
15 |
16 | + (BOOL)supportsPathExtension:(NSString *)extension;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FileBrowser/FLEXActivityViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXActivityViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 5/26/22.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | /// Wraps UIActivityViewController so that it can't dismiss other view controllers
13 | @interface FLEXActivityViewController : UIActivityViewController
14 |
15 | /// @param source A \c UIVIew, \c UIBarButtonItem, or \c NSValue representing a source rect.
16 | + (id)sharing:(NSArray *)items source:(nullable id)source;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FileBrowser/FLEXActivityViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXActivityViewController.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 5/26/22.
6 | //
7 |
8 | #import "FLEXActivityViewController.h"
9 | #import "FLEXMacros.h"
10 |
11 | @interface FLEXActivityViewController ()
12 | @end
13 |
14 | @implementation FLEXActivityViewController
15 |
16 | + (id)sharing:(NSArray *)items source:(id)sender {
17 | UIViewController *shareSheet = [[UIActivityViewController alloc]
18 | initWithActivityItems:items applicationActivities:nil
19 | ];
20 |
21 | if (sender && UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
22 | UIPopoverPresentationController *popover = shareSheet.popoverPresentationController;
23 |
24 | // Source view
25 | if ([sender isKindOfClass:UIView.self]) {
26 | popover.sourceView = sender;
27 | }
28 | // Source bar item
29 | if ([sender isKindOfClass:UIBarButtonItem.self]) {
30 | popover.barButtonItem = sender;
31 | }
32 | // Source rect
33 | if ([sender isKindOfClass:NSValue.self]) {
34 | CGRect rect = [sender CGRectValue];
35 | popover.sourceRect = rect;
36 | }
37 | }
38 |
39 | return shareSheet;
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FileBrowser/FLEXFileBrowserController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXFileBrowserController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/9/14.
6 | // Based on previous work by Evan Doll
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 | #import "FLEXGlobalsEntry.h"
11 | #import "FLEXFileBrowserSearchOperation.h"
12 |
13 | @interface FLEXFileBrowserController : FLEXTableViewController
14 |
15 | + (instancetype)path:(NSString *)path;
16 | - (id)initWithPath:(NSString *)path;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/FileBrowser/FLEXFileBrowserSearchOperation.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXFileBrowserSearchOperation.h
3 | // FLEX
4 | //
5 | // Created by 啟倫 陳 on 2014/8/4.
6 | // Copyright (c) 2014年 f. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol FLEXFileBrowserSearchOperationDelegate;
12 |
13 | @interface FLEXFileBrowserSearchOperation : NSOperation
14 |
15 | @property (nonatomic, weak) id delegate;
16 |
17 | - (id)initWithPath:(NSString *)currentPath searchString:(NSString *)searchString;
18 |
19 | @end
20 |
21 | @protocol FLEXFileBrowserSearchOperationDelegate
22 |
23 | - (void)fileBrowserSearchOperationResult:(NSArray *)searchResult size:(uint64_t)size;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/Globals/FLEXGlobalsSection.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXGlobalsSection.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 7/11/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewSection.h"
10 | #import "FLEXGlobalsEntry.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface FLEXGlobalsSection : FLEXTableViewSection
15 |
16 | + (instancetype)title:(NSString *)title rows:(NSArray *)rows;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/Globals/FLEXGlobalsViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXGlobalsViewController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 2014-05-03.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXFilteringTableViewController.h"
10 | @protocol FLEXGlobalsTableViewControllerDelegate;
11 |
12 | typedef NS_ENUM(NSUInteger, FLEXGlobalsSectionKind) {
13 | FLEXGlobalsSectionCustom,
14 | /// NSProcessInfo, Network history, system log,
15 | /// heap, address explorer, libraries, app classes
16 | FLEXGlobalsSectionProcessAndEvents,
17 | /// Browse container, browse bundle, NSBundle.main,
18 | /// NSUserDefaults.standard, UIApplication,
19 | /// app delegate, key window, root VC, cookies
20 | FLEXGlobalsSectionAppShortcuts,
21 | /// UIPasteBoard.general, UIScreen, UIDevice
22 | FLEXGlobalsSectionMisc,
23 | FLEXGlobalsSectionCount
24 | };
25 |
26 | @interface FLEXGlobalsViewController : FLEXFilteringTableViewController
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/Keychain/FLEXKeychainViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeychainViewController.h
3 | // FLEX
4 | //
5 | // Created by ray on 2019/8/17.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXGlobalsEntry.h"
10 | #import "FLEXFilteringTableViewController.h"
11 |
12 | @interface FLEXKeychainViewController : FLEXFilteringTableViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/Keychain/SSKeychain_LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010-2012 Sam Soffes.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/DataSources/FLEXRuntimeController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntimeController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/23/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import "FLEXRuntimeKeyPath.h"
10 |
11 | /// Wraps FLEXRuntimeClient and provides extra caching mechanisms
12 | @interface FLEXRuntimeController : NSObject
13 |
14 | /// @return An array of strings if the key path only evaluates
15 | /// to a class or bundle; otherwise, a list of lists of FLEXMethods.
16 | + (NSArray *)dataForKeyPath:(FLEXRuntimeKeyPath *)keyPath;
17 |
18 | /// Useful when you need to specify which classes to search in.
19 | /// \c dataForKeyPath: will only search classes matching the class key.
20 | /// We use this elsewhere when we need to search a class hierarchy.
21 | + (NSArray *> *)methodsForToken:(FLEXSearchToken *)token
22 | instance:(NSNumber *)onlyInstanceMethods
23 | inClasses:(NSArray *)classes;
24 |
25 | /// Useful when you need the classes that are associated with the
26 | /// double list of methods returned from \c dataForKeyPath
27 | + (NSMutableArray *)classesForKeyPath:(FLEXRuntimeKeyPath *)keyPath;
28 |
29 | + (NSString *)shortBundleNameForClass:(NSString *)name;
30 |
31 | + (NSString *)imagePathWithShortName:(NSString *)suffix;
32 |
33 | /// Gives back short names. For example, "Foundation.framework"
34 | + (NSArray *)allBundleNames;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/DataSources/FLEXRuntimeExporter.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntimeExporter.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 3/26/20.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// A class for exporting all runtime metadata to an SQLite database.
14 | //API_AVAILABLE(ios(10.0))
15 | @interface FLEXRuntimeExporter : NSObject
16 |
17 | + (void)createRuntimeDatabaseAtPath:(NSString *)path
18 | progressHandler:(void(^)(NSString *status))progress
19 | completion:(void(^)(NSString *_Nullable error))completion;
20 |
21 | + (void)createRuntimeDatabaseAtPath:(NSString *)path
22 | forImages:(nullable NSArray *)images
23 | progressHandler:(void(^)(NSString *status))progress
24 | completion:(void(^)(NSString *_Nullable error))completion;
25 |
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXKBToolbarButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKBToolbarButton.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 6/11/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void (^FLEXKBToolbarAction)(NSString *buttonTitle, BOOL isSuggestion);
12 |
13 |
14 | @interface FLEXKBToolbarButton : UIButton
15 |
16 | /// Set to `default` to use the system appearance on iOS 13+
17 | @property (nonatomic) UIKeyboardAppearance appearance;
18 |
19 | + (instancetype)buttonWithTitle:(NSString *)title;
20 | + (instancetype)buttonWithTitle:(NSString *)title action:(FLEXKBToolbarAction)eventHandler;
21 | + (instancetype)buttonWithTitle:(NSString *)title action:(FLEXKBToolbarAction)action forControlEvents:(UIControlEvents)controlEvents;
22 |
23 | /// Adds the event handler for the button.
24 | ///
25 | /// @param eventHandler The event handler block.
26 | /// @param controlEvents The type of event.
27 | - (void)addEventHandler:(FLEXKBToolbarAction)eventHandler forControlEvents:(UIControlEvents)controlEvents;
28 |
29 | @end
30 |
31 | @interface FLEXKBToolbarSuggestedButton : FLEXKBToolbarButton @end
32 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXKeyPathSearchController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeyPathSearchController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/23/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FLEXRuntimeBrowserToolbar.h"
11 | #import "FLEXMethod.h"
12 |
13 | @protocol FLEXKeyPathSearchControllerDelegate
14 |
15 | @property (nonatomic, readonly) UITableView *tableView;
16 | @property (nonatomic, readonly) UISearchController *searchController;
17 |
18 | /// For loaded images which don't have an NSBundle
19 | - (void)didSelectImagePath:(NSString *)message shortName:(NSString *)shortName;
20 | - (void)didSelectBundle:(NSBundle *)bundle;
21 | - (void)didSelectClass:(Class)cls;
22 |
23 | @end
24 |
25 |
26 | @interface FLEXKeyPathSearchController : NSObject
27 |
28 | + (instancetype)delegate:(id)delegate;
29 |
30 | @property (nonatomic) FLEXRuntimeBrowserToolbar *toolbar;
31 |
32 | /// Suggestions for the toolbar
33 | @property (nonatomic, readonly) NSArray *suggestions;
34 |
35 | - (void)didSelectKeyPathOption:(NSString *)text;
36 | - (void)didPressButton:(NSString *)text insertInto:(UISearchBar *)searchBar;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXKeyboardToolbar.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeyboardToolbar.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 6/11/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import "FLEXKBToolbarButton.h"
10 |
11 | @interface FLEXKeyboardToolbar : UIView
12 |
13 | + (instancetype)toolbarWithButtons:(NSArray *)buttons;
14 |
15 | @property (nonatomic) NSArray *buttons;
16 | @property (nonatomic) UIKeyboardAppearance appearance;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXObjcRuntimeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXObjcRuntimeViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/23/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 | #import "FLEXGlobalsEntry.h"
11 |
12 | @interface FLEXObjcRuntimeViewController : FLEXTableViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXRuntimeBrowserToolbar.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntimeBrowserToolbar.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 6/11/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import "FLEXKeyboardToolbar.h"
10 | #import "FLEXRuntimeKeyPath.h"
11 |
12 | @interface FLEXRuntimeBrowserToolbar : FLEXKeyboardToolbar
13 |
14 | + (instancetype)toolbarWithHandler:(FLEXKBToolbarAction)tapHandler suggestions:(NSArray *)suggestions;
15 |
16 | - (void)setKeyPath:(FLEXRuntimeKeyPath *)keyPath suggestions:(NSArray *)suggestions;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXRuntimeKeyPath.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntimeKeyPath.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/22/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import "FLEXSearchToken.h"
10 | @class FLEXMethod;
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /// A key path represents a query into a set of bundles or classes
15 | /// for a set of one or more methods. It is composed of three tokens:
16 | /// bundle, class, and method. A key path may be incomplete if it
17 | /// is missing any of the tokens. A key path is considered "absolute"
18 | /// if all tokens have no options and if methodKey.string begins
19 | /// with a + or a -.
20 | ///
21 | /// The @code TBKeyPathTokenizer @endcode class is used to create
22 | /// a key path from a string.
23 | @interface FLEXRuntimeKeyPath : NSObject
24 |
25 | + (instancetype)empty;
26 |
27 | /// @param method must start with either a wildcard or a + or -.
28 | + (instancetype)bundle:(FLEXSearchToken *)bundle
29 | class:(FLEXSearchToken *)cls
30 | method:(FLEXSearchToken *)method
31 | isInstance:(NSNumber *)instance
32 | string:(NSString *)keyPathString;
33 |
34 | @property (nonatomic, nullable, readonly) FLEXSearchToken *bundleKey;
35 | @property (nonatomic, nullable, readonly) FLEXSearchToken *classKey;
36 | @property (nonatomic, nullable, readonly) FLEXSearchToken *methodKey;
37 |
38 | /// Indicates whether the method token specifies instance methods.
39 | /// Nil if not specified.
40 | @property (nonatomic, nullable, readonly) NSNumber *instanceMethods;
41 |
42 | @end
43 | NS_ASSUME_NONNULL_END
44 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXRuntimeKeyPathTokenizer.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntimeKeyPathTokenizer.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/22/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import "FLEXRuntimeKeyPath.h"
10 |
11 | @interface FLEXRuntimeKeyPathTokenizer : NSObject
12 |
13 | + (NSUInteger)tokenCountOfString:(NSString *)userInput;
14 | + (FLEXRuntimeKeyPath *)tokenizeString:(NSString *)userInput;
15 |
16 | + (BOOL)allowedInKeyPath:(NSString *)text;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/RuntimeBrowser/FLEXSearchToken.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSearchToken.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/22/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_OPTIONS(NSUInteger, TBWildcardOptions) {
12 | TBWildcardOptionsNone = 0,
13 | TBWildcardOptionsAny = 1,
14 | TBWildcardOptionsPrefix = 1 << 1,
15 | TBWildcardOptionsSuffix = 1 << 2,
16 | };
17 |
18 | /// A token may contain wildcards at one or either end,
19 | /// but not in the middle of the token (as of now).
20 | @interface FLEXSearchToken : NSObject
21 |
22 | + (instancetype)any;
23 | + (instancetype)string:(NSString *)string options:(TBWildcardOptions)options;
24 |
25 | /// Will not contain the wildcard (*) symbol
26 | @property (nonatomic, readonly) NSString *string;
27 | @property (nonatomic, readonly) TBWildcardOptions options;
28 |
29 | /// Opposite of "is ambiguous"
30 | @property (nonatomic, readonly) BOOL isAbsolute;
31 | @property (nonatomic, readonly) BOOL isAny;
32 | /// Still \c isAny, but checks that the string is empty
33 | @property (nonatomic, readonly) BOOL isEmpty;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/SystemLog/FLEXASLLogController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXASLLogController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/14/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXLogController.h"
10 |
11 | @interface FLEXASLLogController : NSObject
12 |
13 | /// Guaranteed to call back on the main thread.
14 | + (instancetype)withUpdateHandler:(void(^)(NSArray *newMessages))newMessagesHandler;
15 |
16 | - (BOOL)startMonitoring;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/SystemLog/FLEXLogController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXLogController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/17/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FLEXSystemLogMessage.h"
11 |
12 | @protocol FLEXLogController
13 |
14 | /// Guaranteed to call back on the main thread.
15 | + (instancetype)withUpdateHandler:(void(^)(NSArray *newMessages))newMessagesHandler;
16 |
17 | - (BOOL)startMonitoring;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/SystemLog/FLEXOSLogController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXOSLogController.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 12/19/18.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXLogController.h"
10 |
11 | #define FLEXOSLogAvailable() (NSProcessInfo.processInfo.operatingSystemVersion.majorVersion >= 10)
12 |
13 | /// The log controller used for iOS 10 and up.
14 | @interface FLEXOSLogController : NSObject
15 |
16 | + (instancetype)withUpdateHandler:(void(^)(NSArray *newMessages))newMessagesHandler;
17 |
18 | - (BOOL)startMonitoring;
19 |
20 | /// Whether log messages are to be recorded and kept in-memory in the background.
21 | /// You do not need to initialize this value, only change it.
22 | @property (nonatomic) BOOL persistent;
23 | /// Used mostly internally, but also used by the log VC to persist messages
24 | /// that were created prior to enabling persistence.
25 | @property (nonatomic) NSMutableArray *messages;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSystemLogCell.h
3 | // FLEX
4 | //
5 | // Created by Ryan Olson on 1/25/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewCell.h"
10 |
11 | @class FLEXSystemLogMessage;
12 |
13 | extern NSString *const kFLEXSystemLogCellIdentifier;
14 |
15 | @interface FLEXSystemLogCell : FLEXTableViewCell
16 |
17 | @property (nonatomic) FLEXSystemLogMessage *logMessage;
18 | @property (nonatomic, copy) NSString *highlightedText;
19 |
20 | + (NSString *)displayedTextForLogMessage:(FLEXSystemLogMessage *)logMessage;
21 | + (CGFloat)preferredHeightForLogMessage:(FLEXSystemLogMessage *)logMessage inWidth:(CGFloat)width;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogMessage.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSystemLogMessage.h
3 | // FLEX
4 | //
5 | // Created by Ryan Olson on 1/25/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "ActivityStreamAPI.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface FLEXSystemLogMessage : NSObject
16 |
17 | + (instancetype)logMessageFromASLMessage:(aslmsg)aslMessage;
18 | + (instancetype)logMessageFromDate:(NSDate *)date text:(NSString *)text;
19 |
20 | // ASL specific properties
21 | @property (nonatomic, readonly, nullable) NSString *sender;
22 | @property (nonatomic, readonly, nullable) aslmsg aslMessage;
23 |
24 | @property (nonatomic, readonly) NSDate *date;
25 | @property (nonatomic, readonly) NSString *messageText;
26 | @property (nonatomic, readonly) long long messageID;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/FLEX/Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSystemLogViewController.h
3 | // FLEX
4 | //
5 | // Created by Ryan Olson on 1/19/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXFilteringTableViewController.h"
10 | #import "FLEXGlobalsEntry.h"
11 |
12 | @interface FLEXSystemLogViewController : FLEXFilteringTableViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/CALayer+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/CALayer+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEX-Categories.h:
--------------------------------------------------------------------------------
1 | ../../Classes/FLEX-Categories.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEX-Core.h:
--------------------------------------------------------------------------------
1 | ../../Classes/FLEX-Core.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEX-ObjectExploring.h:
--------------------------------------------------------------------------------
1 | ../../Classes/FLEX-ObjectExploring.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEX-Runtime.h:
--------------------------------------------------------------------------------
1 | ../../Classes/FLEX-Runtime.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXAlert.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/FLEXAlert.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXBlockDescription.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXBlockDescription.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXClassBuilder.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXClassBuilder.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXCodeFontCell.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Views/Cells/FLEXCodeFontCell.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXCollectionContentSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/FLEXCollectionContentSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXColorPreviewSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/FLEXColorPreviewSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXDefaultsContentSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/FLEXDefaultsContentSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXExplorerToolbar.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Toolbar/FLEXExplorerToolbar.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXExplorerToolbarItem.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Toolbar/FLEXExplorerToolbarItem.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXFilteringTableViewController.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Controllers/FLEXFilteringTableViewController.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXGlobalsEntry.h:
--------------------------------------------------------------------------------
1 | ../../Classes/GlobalStateExplorers/Globals/FLEXGlobalsEntry.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXIvar.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXIvar.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXKeyValueTableViewCell.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Views/Cells/FLEXKeyValueTableViewCell.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMacros.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/FLEXMacros.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXManager+Extensibility.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Manager/FLEXManager+Extensibility.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXManager+Networking.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Manager/FLEXManager+Networking.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXManager.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Manager/FLEXManager.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMetadataExtras.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXMetadataExtras.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMetadataSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/FLEXMetadataSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMethod.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXMethod.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMethodBase.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXMethodBase.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMirror.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXMirror.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMultilineTableViewCell.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Views/Cells/FLEXMultilineTableViewCell.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXMutableListSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/FLEXMutableListSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXNavigationController.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Controllers/FLEXNavigationController.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXObjcInternal.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/FLEXObjcInternal.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXObjectExplorer.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/FLEXObjectExplorer.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXObjectExplorerFactory.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/FLEXObjectExplorerFactory.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXObjectExplorerViewController.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/FLEXObjectExplorerViewController.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXObjectInfoSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/FLEXObjectInfoSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXProperty.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXProperty.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXPropertyAttributes.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXPropertyAttributes.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXProtocol.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXProtocol.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXProtocolBuilder.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/Reflection/FLEXProtocolBuilder.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXResources.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/FLEXResources.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXRuntime+Compare.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/FLEXRuntime+Compare.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXRuntime+UIKitHelpers.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/FLEXRuntime+UIKitHelpers.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXRuntimeConstants.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/FLEXRuntimeConstants.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXRuntimeSafety.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/FLEXRuntimeSafety.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXShortcut.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/Shortcuts/FLEXShortcut.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXShortcutsSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/ObjectExplorers/Sections/Shortcuts/FLEXShortcutsSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXSingleRowSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/FLEXSingleRowSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXSubtitleTableViewCell.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Views/Cells/FLEXSubtitleTableViewCell.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXSwiftInternal.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/FLEXSwiftInternal.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXTableView.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Views/FLEXTableView.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXTableViewCell.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Views/Cells/FLEXTableViewCell.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXTableViewController.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/Controllers/FLEXTableViewController.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXTableViewSection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Core/FLEXTableViewSection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/FLEXTypeEncodingParser.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Runtime/Objc/FLEXTypeEncodingParser.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/NSArray+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/NSArray+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/NSDateFormatter+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/NSDateFormatter+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/NSObject+FLEX_Reflection.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/NSObject+FLEX_Reflection.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/NSTimer+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/NSTimer+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/NSUserDefaults+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/NSUserDefaults+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/UIBarButtonItem+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/UIBarButtonItem+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/UIFont+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/UIFont+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/UIGestureRecognizer+Blocks.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/UIGestureRecognizer+Blocks.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/UIMenu+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/UIMenu+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/UIPasteboard+FLEX.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/UIPasteboard+FLEX.h
--------------------------------------------------------------------------------
/FLEX/Classes/Headers/UITextField+Range.h:
--------------------------------------------------------------------------------
1 | ../../Classes/Utility/Categories/UITextField+Range.h
--------------------------------------------------------------------------------
/FLEX/Classes/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/FLEX/Classes/Manager/Private/FLEXManager+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXManager+Private.h
3 | // PebbleApp
4 | //
5 | // Created by Javier Soto on 7/26/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXManager.h"
10 | #import "FLEXWindow.h"
11 |
12 | @class FLEXGlobalsEntry, FLEXExplorerViewController;
13 |
14 | @interface FLEXManager (Private)
15 |
16 | @property (nonatomic, readonly) FLEXWindow *explorerWindow;
17 | @property (nonatomic, readonly) FLEXExplorerViewController *explorerViewController;
18 |
19 | /// An array of FLEXGlobalsEntry objects that have been registered by the user.
20 | @property (nonatomic, readonly) NSMutableArray *userGlobalEntries;
21 | @property (nonatomic, readonly) NSMutableDictionary *customContentTypeViewers;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/FLEXHTTPTransactionDetailController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXHTTPTransactionDetailController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 2/10/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class FLEXHTTPTransaction;
12 |
13 | @interface FLEXHTTPTransactionDetailController : UITableViewController
14 |
15 | + (instancetype)withTransaction:(FLEXHTTPTransaction *)transaction;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/FLEXMITMDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMITMDataSource.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 8/22/21.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface FLEXMITMDataSource<__covariant TransactionType> : NSObject
13 |
14 | + (instancetype)dataSourceWithProvider:(NSArray *(^)(void))future;
15 |
16 | /// Whether or not the data in \c transactions and \c bytesReceived are actually filtered yet or not
17 | @property (nonatomic, readonly) BOOL isFiltered;
18 |
19 | /// The content of this array is filtered to match the input of \c filter:completion:
20 | @property (nonatomic, readonly) NSArray *transactions;
21 | @property (nonatomic, readonly) NSArray *allTransactions;
22 |
23 | /// The content of this array is filtered to match the input of \c filter:completion:
24 | @property (nonatomic) NSInteger bytesReceived;
25 | @property (nonatomic) NSInteger totalBytesReceived;
26 |
27 | - (void)reloadByteCounts;
28 | - (void)reloadData:(void (^_Nullable)(FLEXMITMDataSource *dataSource))completion;
29 | - (void)filter:(NSString *)searchString completion:(void(^_Nullable)(FLEXMITMDataSource *dataSource))completion;
30 |
31 | @end
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/FLEXNetworkCurlLogger.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXCurlLogger.h
3 | //
4 | //
5 | // Created by Ji Pei on 07/27/16
6 | //
7 |
8 | #import
9 |
10 | @interface FLEXNetworkCurlLogger : NSObject
11 |
12 | /**
13 | * Generates a cURL command equivalent to the given request.
14 | *
15 | * @param request The request to be translated
16 | */
17 | + (NSString *)curlCommandString:(NSURLRequest *)request;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/FLEXNetworkCurlLogger.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXCurlLogger.m
3 | //
4 | //
5 | // Created by Ji Pei on 07/27/16
6 | //
7 |
8 | #import "FLEXNetworkCurlLogger.h"
9 |
10 | @implementation FLEXNetworkCurlLogger
11 |
12 | + (NSString *)curlCommandString:(NSURLRequest *)request {
13 | __block NSMutableString *curlCommandString = [NSMutableString stringWithFormat:@"curl -v -X %@ ", request.HTTPMethod];
14 |
15 | [curlCommandString appendFormat:@"\'%@\' ", request.URL.absoluteString];
16 |
17 | [request.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *val, BOOL *stop) {
18 | [curlCommandString appendFormat:@"-H \'%@: %@\' ", key, val];
19 | }];
20 |
21 | NSArray *cookies = [NSHTTPCookieStorage.sharedHTTPCookieStorage cookiesForURL:request.URL];
22 | if (cookies) {
23 | [curlCommandString appendFormat:@"-H \'Cookie:"];
24 | for (NSHTTPCookie *cookie in cookies) {
25 | [curlCommandString appendFormat:@" %@=%@;", cookie.name, cookie.value];
26 | }
27 | [curlCommandString appendFormat:@"\' "];
28 | }
29 |
30 | if (request.HTTPBody) {
31 | NSString *body = [[NSString alloc] initWithData:request.HTTPBody encoding:NSUTF8StringEncoding];
32 | [curlCommandString appendFormat:@"-d \'%@\'", body];
33 | }
34 |
35 | return curlCommandString;
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/FLEXNetworkMITMViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNetworkMITMViewController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 2/8/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 | #import "FLEXGlobalsEntry.h"
11 |
12 | /// The main screen for the network observer, which displays a list of network transactions.
13 | @interface FLEXNetworkMITMViewController : FLEXTableViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/FLEXNetworkSettingsController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNetworkSettingsController.h
3 | // FLEXInjected
4 | //
5 | // Created by Ryan Olson on 2/20/15.
6 | //
7 |
8 | #import "FLEXTableViewController.h"
9 |
10 | @interface FLEXNetworkSettingsController : FLEXTableViewController
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/FLEXNetworkTransactionCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNetworkTransactionCell.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 2/8/15.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class FLEXNetworkTransaction;
12 |
13 | @interface FLEXNetworkTransactionCell : UITableViewCell
14 |
15 | @property (nonatomic) FLEXNetworkTransaction *transaction;
16 |
17 | @property (nonatomic, readonly, class) NSString *reuseID;
18 | @property (nonatomic, readonly, class) CGFloat preferredCellHeight;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/OSCache/LICENSE.md:
--------------------------------------------------------------------------------
1 | OSCache
2 | version 1.2.1, Decembet 18th, 2015
3 |
4 | Copyright (C) 2014 Charcoal Design
5 |
6 | This software is provided 'as-is', without any express or implied
7 | warranty. In no event will the authors be held liable for any damages
8 | arising from the use of this software.
9 |
10 | Permission is granted to anyone to use this software for any purpose,
11 | including commercial applications, and to alter it and redistribute it
12 | freely, subject to the following restrictions:
13 |
14 | 1. The origin of this software must not be misrepresented; you must not
15 | claim that you wrote the original software. If you use this software
16 | in a product, an acknowledgment in the product documentation would be
17 | appreciated but is not required.
18 | 2. Altered source versions must be plainly marked as such, and must not be
19 | misrepresented as being the original software.
20 | 3. This notice may not be removed or altered from any source distribution.
--------------------------------------------------------------------------------
/FLEX/Classes/Network/PonyDebugger/FLEXNetworkObserver.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNetworkObserver.h
3 | // Derived from:
4 | //
5 | // PDAFNetworkDomainController.h
6 | // PonyDebugger
7 | //
8 | // Created by Mike Lewis on 2/27/12.
9 | //
10 | // Licensed to Square, Inc. under one or more contributor license agreements.
11 | // See the LICENSE file distributed with this work for the terms under
12 | // which Square, Inc. licenses this file to you.
13 | //
14 |
15 | #import
16 |
17 | FOUNDATION_EXTERN NSString *const kFLEXNetworkObserverEnabledStateChangedNotification;
18 |
19 | /// This class swizzles NSURLConnection and NSURLSession delegate methods to observe events in the URL loading system.
20 | /// High level network events are sent to the default FLEXNetworkRecorder instance which maintains the request history and caches response bodies.
21 | @interface FLEXNetworkObserver : NSObject
22 |
23 | /// Swizzling occurs when the observer is enabled for the first time.
24 | /// This reduces the impact of FLEX if network debugging is not desired.
25 | /// NOTE: this setting persists between launches of the app.
26 | @property (nonatomic, class, getter=isEnabled) BOOL enabled;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/FLEX/Classes/Network/PonyDebugger/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | PonyDebugger
3 | Copyright 2012 Square Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 |
17 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/FLEXObjectExplorerFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXObjectExplorerFactory.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 5/15/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXGlobalsEntry.h"
10 |
11 | #ifndef _FLEXObjectExplorerViewController_h
12 | #import "FLEXObjectExplorerViewController.h"
13 | #else
14 | @class FLEXObjectExplorerViewController;
15 | #endif
16 |
17 | NS_ASSUME_NONNULL_BEGIN
18 |
19 | @interface FLEXObjectExplorerFactory : NSObject
20 |
21 | + (nullable FLEXObjectExplorerViewController *)explorerViewControllerForObject:(nullable id)object;
22 |
23 | /// Register a specific explorer view controller class to be used when exploring
24 | /// an object of a specific class. Calls will overwrite existing registrations.
25 | /// Sections must be initialized using \c forObject: like
26 | + (void)registerExplorerSection:(Class)sectionClass forClass:(Class)objectClass;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/FLEXColorPreviewSection.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXColorPreviewSection.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/12/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXSingleRowSection.h"
10 | #import "FLEXObjectInfoSection.h"
11 |
12 | @interface FLEXColorPreviewSection : FLEXSingleRowSection
13 |
14 | + (instancetype)forObject:(UIColor *)color;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/FLEXColorPreviewSection.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXColorPreviewSection.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/12/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXColorPreviewSection.h"
10 |
11 | @implementation FLEXColorPreviewSection
12 |
13 | + (instancetype)forObject:(UIColor *)color {
14 | return [self title:@"Color" reuse:nil cell:^(__kindof UITableViewCell *cell) {
15 | cell.backgroundColor = color;
16 | }];
17 | }
18 |
19 | - (BOOL)canSelectRow:(NSInteger)row {
20 | return NO;
21 | }
22 |
23 | - (BOOL (^)(NSString *))filterMatcher {
24 | return ^BOOL(NSString *filterText) {
25 | // Hide when searching
26 | return !filterText.length;
27 | };
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/FLEXDefaultsContentSection.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXDefaultsContentSection.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 8/28/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXCollectionContentSection.h"
10 | #import "FLEXObjectInfoSection.h"
11 |
12 | @interface FLEXDefaultsContentSection : FLEXCollectionContentSection
13 |
14 | /// Uses \c NSUserDefaults.standardUserDefaults
15 | + (instancetype)standard;
16 | + (instancetype)forDefaults:(NSUserDefaults *)userDefaults;
17 |
18 | /// Whether or not to filter out keys not present in the app's user defaults file.
19 | ///
20 | /// This is useful for filtering out some useless keys that seem to appear
21 | /// in every app's defaults but are never actually used or touched by the app.
22 | /// Only applies to instances using \c NSUserDefaults.standardUserDefaults.
23 | /// This is the default for any instance using \c standardUserDefaults, so
24 | /// you must opt-out in those instances if you don't want this behavior.
25 | @property (nonatomic) BOOL onlyShowKeysForAppPrefs;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/FLEXMetadataSection.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMetadataSection.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 9/19/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewSection.h"
10 | #import "FLEXObjectExplorer.h"
11 |
12 | typedef NS_ENUM(NSUInteger, FLEXMetadataKind) {
13 | FLEXMetadataKindProperties = 1,
14 | FLEXMetadataKindClassProperties,
15 | FLEXMetadataKindIvars,
16 | FLEXMetadataKindMethods,
17 | FLEXMetadataKindClassMethods,
18 | FLEXMetadataKindClassHierarchy,
19 | FLEXMetadataKindProtocols,
20 | FLEXMetadataKindOther
21 | };
22 |
23 | /// This section is used for displaying ObjC runtime metadata
24 | /// about a class or object, such as listing methods, properties, etc.
25 | @interface FLEXMetadataSection : FLEXTableViewSection
26 |
27 | + (instancetype)explorer:(FLEXObjectExplorer *)explorer kind:(FLEXMetadataKind)metadataKind;
28 |
29 | @property (nonatomic, readonly) FLEXMetadataKind metadataKind;
30 |
31 | /// The names of metadata to exclude. Useful if you wish to group specific
32 | /// properties or methods together in their own section outside of this one.
33 | ///
34 | /// Setting this property calls \c reloadData on this section.
35 | @property (nonatomic) NSSet *excludedMetadata;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/FLEXObjectInfoSection.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXObjectInfoSection.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 8/28/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// \c FLEXTableViewSection itself doesn't know about the object being explored.
12 | /// Subclasses might need this info to provide useful information about the object. Instead
13 | /// of adding an abstract class to the class hierarchy, subclasses can conform to this protocol
14 | /// to indicate that the only info they need to be initialized is the object being explored.
15 | @protocol FLEXObjectInfoSection
16 |
17 | + (instancetype)forObject:(id)object;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXBlockShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXBlockShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 1/30/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// Provides a description of the block's signature
14 | /// and access to an NSMethodSignature of the block
15 | @interface FLEXBlockShortcuts : FLEXShortcutsSection
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXBundleShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXBundleShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/12/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// Provides a "Browse Bundle Directory" action
14 | @interface FLEXBundleShortcuts : FLEXShortcutsSection
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXClassShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXClassShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 11/22/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | /// Provides handy shortcuts for class objects.
12 | /// This is the default section used for all class objects.
13 | @interface FLEXClassShortcuts : FLEXShortcutsSection
14 |
15 | + (instancetype)forObject:(Class)cls;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXImageShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXImageShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 8/29/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | /// Provides "view image" and "save image" shortcuts for UIImage objects
12 | @interface FLEXImageShortcuts : FLEXShortcutsSection
13 |
14 | + (instancetype)forObject:(UIImage *)image;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXLayerShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXLayerShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/12/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | @interface FLEXLayerShortcuts : FLEXShortcutsSection
12 |
13 | + (instancetype)forObject:(CALayer *)layer;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXLayerShortcuts.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXLayerShortcuts.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/12/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXLayerShortcuts.h"
10 | #import "FLEXShortcut.h"
11 | #import "FLEXImagePreviewViewController.h"
12 |
13 | @implementation FLEXLayerShortcuts
14 |
15 | + (instancetype)forObject:(CALayer *)layer {
16 | return [self forObject:layer additionalRows:@[
17 | [FLEXActionShortcut title:@"Preview Image" subtitle:nil
18 | viewer:^UIViewController *(CALayer *layer) {
19 | return [FLEXImagePreviewViewController previewForLayer:layer];
20 | }
21 | accessoryType:^UITableViewCellAccessoryType(CALayer *layer) {
22 | return CGRectIsEmpty(layer.bounds) ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;
23 | }
24 | ]
25 | ]];
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXNSDataShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNSDataShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/29/21.
6 | //
7 |
8 | #import "FLEXShortcutsSection.h"
9 |
10 | /// Adds a "UTF-8 String" shortcut
11 | @interface FLEXNSDataShortcuts : FLEXShortcutsSection
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXNSDataShortcuts.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNSDataShortcuts.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/29/21.
6 | //
7 |
8 | #import "FLEXNSDataShortcuts.h"
9 | #import "FLEXObjectExplorerFactory.h"
10 | #import "FLEXShortcut.h"
11 |
12 | @implementation FLEXNSDataShortcuts
13 |
14 | + (instancetype)forObject:(NSData *)data {
15 | NSString *string = [self stringForData:data];
16 |
17 | return [self forObject:data additionalRows:@[
18 | [FLEXActionShortcut title:@"UTF-8 String" subtitle:^(NSData *object) {
19 | return string.length ? string : (string ?
20 | @"Data is not a UTF8 String" : @"Empty string"
21 | );
22 | } viewer:^UIViewController *(id object) {
23 | return [FLEXObjectExplorerFactory explorerViewControllerForObject:string];
24 | } accessoryType:^UITableViewCellAccessoryType(NSData *object) {
25 | if (string.length) {
26 | return UITableViewCellAccessoryDisclosureIndicator;
27 | }
28 |
29 | return UITableViewCellAccessoryNone;
30 | }]
31 | ]];
32 | }
33 |
34 | + (NSString *)stringForData:(NSData *)data {
35 | return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
36 | }
37 |
38 | @end
39 |
40 | @interface NSData (Overrides) @end
41 | @implementation NSData (Overrides)
42 |
43 | // This normally crashes
44 | - (NSUInteger)length {
45 | return 0;
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXNSStringShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNSStringShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/29/21.
6 | //
7 |
8 | #import "FLEXShortcutsSection.h"
9 |
10 | /// Adds a "UTF-8 Data" shortcut
11 | @interface FLEXNSStringShortcuts : FLEXShortcutsSection
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXNSStringShortcuts.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNSStringShortcuts.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/29/21.
6 | //
7 |
8 | #import "FLEXNSStringShortcuts.h"
9 | #import "FLEXObjectExplorerFactory.h"
10 | #import "FLEXShortcut.h"
11 |
12 | @implementation FLEXNSStringShortcuts
13 |
14 | + (instancetype)forObject:(NSString *)string {
15 | NSUInteger length = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
16 | NSData *data = [NSData dataWithBytesNoCopy:(void *)string.UTF8String length:length freeWhenDone:NO];
17 |
18 | return [self forObject:string additionalRows:@[
19 | [FLEXActionShortcut title:@"UTF-8 Data" subtitle:^NSString *(id _) {
20 | return data.description;
21 | } viewer:^UIViewController *(id _) {
22 | return [FLEXObjectExplorerFactory explorerViewControllerForObject:data];
23 | } accessoryType:^UITableViewCellAccessoryType(id _) {
24 | return UITableViewCellAccessoryDisclosureIndicator;
25 | }]
26 | ]];
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXShortcutsFactory+Defaults.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXShortcutsFactory+Defaults.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 8/29/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | @interface FLEXShortcutsFactory (UIApplication) @end
12 |
13 | @interface FLEXShortcutsFactory (Views) @end
14 |
15 | @interface FLEXShortcutsFactory (ViewControllers) @end
16 |
17 | @interface FLEXShortcutsFactory (UIImage) @end
18 |
19 | @interface FLEXShortcutsFactory (NSBundle) @end
20 |
21 | @interface FLEXShortcutsFactory (Classes) @end
22 |
23 | @interface FLEXShortcutsFactory (Activities) @end
24 |
25 | @interface FLEXShortcutsFactory (Blocks) @end
26 |
27 | @interface FLEXShortcutsFactory (Foundation) @end
28 |
29 | @interface FLEXShortcutsFactory (WebKit_Safari) @end
30 |
31 | @interface FLEXShortcutsFactory (Pasteboard) @end
32 |
33 | @interface FLEXShortcutsFactory (FirebaseFirestore) @end
34 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXUIAppShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXUIAppShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 5/25/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | @interface FLEXUIAppShortcuts : FLEXShortcutsSection
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXViewControllerShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXViewControllerShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/12/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | @interface FLEXViewControllerShortcuts : FLEXShortcutsSection
12 |
13 | + (instancetype)forObject:(UIViewController *)viewController;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXViewShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXViewShortcuts.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/11/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXShortcutsSection.h"
10 |
11 | /// Adds "Nearest View Controller" and "Preview Image" shortcuts to all views
12 | @interface FLEXViewShortcuts : FLEXShortcutsSection
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/ObjectExplorers/Sections/Shortcuts/FLEXWindowShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXWindowShortcuts.h
3 | // FLEX
4 | //
5 | // Created by AnthoPak on 26/09/2022.
6 | //
7 |
8 | #import "FLEXShortcutsSection.h"
9 |
10 | /// Adds "Animations Speed" shortcut for all windows
11 | @interface FLEXWindowShortcuts : FLEXShortcutsSection
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/CALayer+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // CALayer+FLEX.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/28/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CALayer (FLEX)
12 |
13 | @property (nonatomic) BOOL flex_continuousCorners;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/CALayer+FLEX.m:
--------------------------------------------------------------------------------
1 | //
2 | // CALayer+FLEX.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/28/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "CALayer+FLEX.h"
10 |
11 | @interface CALayer (Private)
12 | @property (nonatomic) BOOL continuousCorners;
13 | @end
14 |
15 | @implementation CALayer (FLEX)
16 |
17 | static BOOL respondsToContinuousCorners = NO;
18 |
19 | + (void)load {
20 | respondsToContinuousCorners = [CALayer
21 | instancesRespondToSelector:@selector(setContinuousCorners:)
22 | ];
23 | }
24 |
25 | - (BOOL)flex_continuousCorners {
26 | if (respondsToContinuousCorners) {
27 | return self.continuousCorners;
28 | }
29 |
30 | return NO;
31 | }
32 |
33 | - (void)setFlex_continuousCorners:(BOOL)enabled {
34 | if (respondsToContinuousCorners) {
35 | if (@available(iOS 13, *)) {
36 | self.cornerCurve = kCACornerCurveContinuous;
37 | } else {
38 | self.continuousCorners = enabled;
39 | // self.masksToBounds = NO;
40 | // self.allowsEdgeAntialiasing = YES;
41 | // self.edgeAntialiasingMask = kCALayerLeftEdge | kCALayerRightEdge | kCALayerTopEdge | kCALayerBottomEdge;
42 | }
43 | }
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/FLEXRuntime+Compare.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntime+Compare.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 8/28/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FLEXProperty.h"
11 | #import "FLEXIvar.h"
12 | #import "FLEXMethodBase.h"
13 | #import "FLEXProtocol.h"
14 |
15 | @interface FLEXProperty (Compare)
16 | - (NSComparisonResult)compare:(FLEXProperty *)other;
17 | @end
18 |
19 | @interface FLEXIvar (Compare)
20 | - (NSComparisonResult)compare:(FLEXIvar *)other;
21 | @end
22 |
23 | @interface FLEXMethodBase (Compare)
24 | - (NSComparisonResult)compare:(FLEXMethodBase *)other;
25 | @end
26 |
27 | @interface FLEXProtocol (Compare)
28 | - (NSComparisonResult)compare:(FLEXProtocol *)other;
29 | @end
30 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/FLEXRuntime+Compare.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntime+Compare.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 8/28/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXRuntime+Compare.h"
10 |
11 | @implementation FLEXProperty (Compare)
12 |
13 | - (NSComparisonResult)compare:(FLEXProperty *)other {
14 | NSComparisonResult r = [self.name caseInsensitiveCompare:other.name];
15 | if (r == NSOrderedSame) {
16 | // TODO make sure empty image name sorts above an image name
17 | return [self.imageName ?: @"" compare:other.imageName];
18 | }
19 |
20 | return r;
21 | }
22 |
23 | @end
24 |
25 | @implementation FLEXIvar (Compare)
26 |
27 | - (NSComparisonResult)compare:(FLEXIvar *)other {
28 | return [self.name caseInsensitiveCompare:other.name];
29 | }
30 |
31 | @end
32 |
33 | @implementation FLEXMethodBase (Compare)
34 |
35 | - (NSComparisonResult)compare:(FLEXMethodBase *)other {
36 | return [self.name caseInsensitiveCompare:other.name];
37 | }
38 |
39 | @end
40 |
41 | @implementation FLEXProtocol (Compare)
42 |
43 | - (NSComparisonResult)compare:(FLEXProtocol *)other {
44 | return [self.name caseInsensitiveCompare:other.name];
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/NSDateFormatter+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDateFormatter+FLEX.h
3 | // libflex:FLEX
4 | //
5 | // Created by Tanner Bennett on 7/24/22.
6 | // Copyright © 2022 Flipboard. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSUInteger, FLEXDateFormat) {
12 | // hour:minute [AM|PM]
13 | FLEXDateFormatClock,
14 | // hour:minute:second [AM|PM]
15 | FLEXDateFormatPreciseClock,
16 | // year-month-day hour:minute:second.millisecond
17 | FLEXDateFormatVerbose,
18 | };
19 |
20 | @interface NSDateFormatter (FLEX)
21 |
22 | + (NSString *)flex_stringFrom:(NSDate *)date format:(FLEXDateFormat)format;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/NSDateFormatter+FLEX.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDateFormatter+FLEX.m
3 | // libflex:FLEX
4 | //
5 | // Created by Tanner Bennett on 7/24/22.
6 | // Copyright © 2022 Flipboard. All rights reserved.
7 | //
8 |
9 | #import "NSDateFormatter+FLEX.h"
10 |
11 | @implementation NSDateFormatter (FLEX)
12 |
13 | + (NSString *)flex_stringFrom:(NSDate *)date format:(FLEXDateFormat)format {
14 | static NSDateFormatter *formatter = nil;
15 | if (!formatter) {
16 | formatter = [NSDateFormatter new];
17 | }
18 |
19 | switch (format) {
20 | case FLEXDateFormatClock:
21 | formatter.dateFormat = @"h:mm a";
22 | break;
23 | case FLEXDateFormatPreciseClock:
24 | formatter.dateFormat = @"h:mm:ss a";
25 | break;
26 | case FLEXDateFormatVerbose:
27 | formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss.SSS";
28 | break;
29 | }
30 |
31 | return [formatter stringFromDate:date];
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/NSTimer+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSTimer+Blocks.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/23/17.
6 | //
7 |
8 | #import
9 |
10 | typedef void (^VoidBlock)(void);
11 |
12 | @interface NSTimer (Blocks)
13 |
14 | + (instancetype)flex_fireSecondsFromNow:(NSTimeInterval)delay block:(VoidBlock)block;
15 |
16 | // Forward declaration
17 | //+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)repeats block:(void (^)(NSTimer *timer))block;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/NSTimer+FLEX.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSTimer+Blocks.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/23/17.
6 | //
7 |
8 | #import "NSTimer+FLEX.h"
9 |
10 | @interface Block : NSObject
11 | - (void)invoke;
12 | @end
13 |
14 | #pragma clang diagnostic ignored "-Wincomplete-implementation"
15 | @implementation NSTimer (Blocks)
16 |
17 | + (instancetype)flex_fireSecondsFromNow:(NSTimeInterval)delay block:(VoidBlock)block {
18 | if (@available(iOS 10, *)) {
19 | return [self scheduledTimerWithTimeInterval:delay repeats:NO block:(id)block];
20 | } else {
21 | return [self scheduledTimerWithTimeInterval:delay target:block selector:@selector(invoke) userInfo:nil repeats:NO];
22 | }
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/Cocoa+FLEXShortcuts.h:
--------------------------------------------------------------------------------
1 | //
2 | // Cocoa+FLEXShortcuts.h
3 | // Pods
4 | //
5 | // Created by Tanner on 2/24/21.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface UIAlertAction (FLEXShortcuts)
12 | @property (nonatomic, readonly) NSString *flex_styleName;
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/Cocoa+FLEXShortcuts.m:
--------------------------------------------------------------------------------
1 | //
2 | // Cocoa+FLEXShortcuts.m
3 | // Pods
4 | //
5 | // Created by Tanner on 2/24/21.
6 | //
7 | //
8 |
9 | #import "Cocoa+FLEXShortcuts.h"
10 |
11 | @implementation UIAlertAction (FLEXShortcuts)
12 | - (NSString *)flex_styleName {
13 | switch (self.style) {
14 | case UIAlertActionStyleDefault:
15 | return @"Default style";
16 | case UIAlertActionStyleCancel:
17 | return @"Cancel style";
18 | case UIAlertActionStyleDestructive:
19 | return @"Destructive style";
20 |
21 | default:
22 | return [NSString stringWithFormat:@"Unknown (%@)", @(self.style)];
23 | }
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/NSDictionary+ObjcRuntime.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+ObjcRuntime.h
3 | // FLEX
4 | //
5 | // Derived from MirrorKit.
6 | // Created by Tanner on 7/5/15.
7 | // Copyright (c) 2020 FLEX Team. All rights reserved.
8 | //
9 |
10 | #import
11 | #import
12 |
13 | @interface NSDictionary (ObjcRuntime)
14 |
15 | /// \c kFLEXPropertyAttributeKeyTypeEncoding is the only required key.
16 | /// Keys representing a boolean value should have a value of \c YES instead of an empty string.
17 | - (NSString *)propertyAttributesString;
18 |
19 | + (instancetype)attributesDictionaryForProperty:(objc_property_t)property;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/NSMapTable+FLEX_Subscripting.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMapTable+FLEX_Subscripting.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/9/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NSMapTable (FLEX_Subscripting)
14 |
15 | - (nullable ObjectType)objectForKeyedSubscript:(KeyType)key;
16 | - (void)setObject:(nullable ObjectType)obj forKeyedSubscript:(KeyType )key;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/NSMapTable+FLEX_Subscripting.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMapTable+FLEX_Subscripting.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/9/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "NSMapTable+FLEX_Subscripting.h"
10 |
11 | @implementation NSMapTable (FLEX_Subscripting)
12 |
13 | - (id)objectForKeyedSubscript:(id)key {
14 | return [self objectForKey:key];
15 | }
16 |
17 | - (void)setObject:(id)obj forKeyedSubscript:(id)key {
18 | [self setObject:obj forKey:key];
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/NSString+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+FLEX.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/26/17.
6 | // Copyright © 2017 Tanner Bennett. All rights reserved.
7 | //
8 |
9 | #import "FLEXRuntimeConstants.h"
10 |
11 | @interface NSString (FLEXTypeEncoding)
12 |
13 | ///@return whether this type starts with the const specifier
14 | @property (nonatomic, readonly) BOOL flex_typeIsConst;
15 | /// @return the first char in the type encoding that is not the const specifier
16 | @property (nonatomic, readonly) FLEXTypeEncoding flex_firstNonConstType;
17 | /// @return the first char in the type encoding after the pointer specifier, if it is a pointer
18 | @property (nonatomic, readonly) FLEXTypeEncoding flex_pointeeType;
19 | /// @return whether this type is an objc object of any kind, even if it's const
20 | @property (nonatomic, readonly) BOOL flex_typeIsObjectOrClass;
21 | /// @return the class named in this type encoding if it is of the form \c @"MYClass"
22 | @property (nonatomic, readonly) Class flex_typeClass;
23 | /// Includes C strings and selectors as well as regular pointers
24 | @property (nonatomic, readonly) BOOL flex_typeIsNonObjcPointer;
25 |
26 | @end
27 |
28 | @interface NSString (KeyPaths)
29 |
30 | - (NSString *)flex_stringByRemovingLastKeyPathComponent;
31 | - (NSString *)flex_stringByReplacingLastKeyPathComponent:(NSString *)replacement;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/NSString+ObjcRuntime.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+ObjcRuntime.h
3 | // FLEX
4 | //
5 | // Derived from MirrorKit.
6 | // Created by Tanner on 7/1/15.
7 | // Copyright (c) 2020 FLEX Team. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface NSString (Utilities)
13 |
14 | /// A dictionary of property attributes if the receiver is a valid property attributes string.
15 | /// Values are either a string or \c YES. Boolean attributes which are false will not be
16 | /// present in the dictionary. See this link on how to construct a proper attributes string:
17 | /// https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html
18 | ///
19 | /// Note: this method doesn't work properly for certain type encodings, and neither does
20 | /// the property_copyAttributeValue function in the runtime itself. Radar: FB7499230
21 | - (NSDictionary *)propertyAttributes;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/Private/UIView+FLEX_Layout.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+FLEX_Layout.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 7/18/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define Padding(p) UIEdgeInsetsMake(p, p, p, p)
12 |
13 | @interface UIView (FLEX_Layout)
14 |
15 | - (void)flex_centerInView:(UIView *)view;
16 | - (void)flex_pinEdgesTo:(UIView *)view;
17 | - (void)flex_pinEdgesTo:(UIView *)view withInsets:(UIEdgeInsets)insets;
18 | - (void)flex_pinEdgesToSuperview;
19 | - (void)flex_pinEdgesToSuperviewWithInsets:(UIEdgeInsets)insets;
20 | - (void)flex_pinEdgesToSuperviewWithInsets:(UIEdgeInsets)insets aboveView:(UIView *)sibling;
21 | - (void)flex_pinEdgesToSuperviewWithInsets:(UIEdgeInsets)insets belowView:(UIView *)sibling;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIBarButtonItem+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+FLEX.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 2/4/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define FLEXBarButtonItem(title, tgt, sel) \
12 | [UIBarButtonItem flex_itemWithTitle:title target:tgt action:sel]
13 | #define FLEXBarButtonItemSystem(item, tgt, sel) \
14 | [UIBarButtonItem flex_systemItem:UIBarButtonSystemItem##item target:tgt action:sel]
15 |
16 | @interface UIBarButtonItem (FLEX)
17 |
18 | @property (nonatomic, readonly, class) UIBarButtonItem *flex_flexibleSpace;
19 | @property (nonatomic, readonly, class) UIBarButtonItem *flex_fixedSpace;
20 |
21 | + (instancetype)flex_itemWithCustomView:(UIView *)customView;
22 | + (instancetype)flex_backItemWithTitle:(NSString *)title;
23 |
24 | + (instancetype)flex_systemItem:(UIBarButtonSystemItem)item target:(id)target action:(SEL)action;
25 |
26 | + (instancetype)flex_itemWithTitle:(NSString *)title target:(id)target action:(SEL)action;
27 | + (instancetype)flex_doneStyleitemWithTitle:(NSString *)title target:(id)target action:(SEL)action;
28 |
29 | + (instancetype)flex_itemWithImage:(UIImage *)image target:(id)target action:(SEL)action;
30 |
31 | + (instancetype)flex_disabledSystemItem:(UIBarButtonSystemItem)item;
32 | + (instancetype)flex_disabledItemWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style;
33 | + (instancetype)flex_disabledItemWithImage:(UIImage *)image;
34 |
35 | /// @return the receiver
36 | - (UIBarButtonItem *)flex_withTintColor:(UIColor *)tint;
37 |
38 | - (void)_setWidth:(CGFloat)width;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIFont+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIFont+FLEX.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/20/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIFont (FLEX)
12 |
13 | @property (nonatomic, readonly, class) UIFont *flex_defaultTableCellFont;
14 | @property (nonatomic, readonly, class) UIFont *flex_codeFont;
15 | @property (nonatomic, readonly, class) UIFont *flex_smallCodeFont;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIFont+FLEX.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIFont+FLEX.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/20/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "UIFont+FLEX.h"
10 |
11 | #define kFLEXDefaultCellFontSize 12.0
12 |
13 | @implementation UIFont (FLEX)
14 |
15 | + (UIFont *)flex_defaultTableCellFont {
16 | static UIFont *defaultTableCellFont = nil;
17 | static dispatch_once_t onceToken;
18 | dispatch_once(&onceToken, ^{
19 | defaultTableCellFont = [UIFont systemFontOfSize:kFLEXDefaultCellFontSize];
20 | });
21 |
22 | return defaultTableCellFont;
23 | }
24 |
25 | + (UIFont *)flex_codeFont {
26 | // Actually only available in iOS 13, the SDK headers are wrong
27 | if (@available(iOS 13, *)) {
28 | return [self monospacedSystemFontOfSize:kFLEXDefaultCellFontSize weight:UIFontWeightRegular];
29 | } else {
30 | return [self fontWithName:@"Menlo-Regular" size:kFLEXDefaultCellFontSize];
31 | }
32 | }
33 |
34 | + (UIFont *)flex_smallCodeFont {
35 | // Actually only available in iOS 13, the SDK headers are wrong
36 | if (@available(iOS 13, *)) {
37 | return [self monospacedSystemFontOfSize:self.smallSystemFontSize weight:UIFontWeightRegular];
38 | } else {
39 | return [self fontWithName:@"Menlo-Regular" size:self.smallSystemFontSize];
40 | }
41 | }
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIGestureRecognizer+Blocks.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+Blocks.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/20/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void (^GestureBlock)(UIGestureRecognizer *gesture);
12 |
13 |
14 | @interface UIGestureRecognizer (Blocks)
15 |
16 | + (instancetype)flex_action:(GestureBlock)action;
17 |
18 | @property (nonatomic, setter=flex_setAction:) GestureBlock flex_action;
19 |
20 | @end
21 |
22 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIGestureRecognizer+Blocks.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+Blocks.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/20/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "UIGestureRecognizer+Blocks.h"
10 | #import
11 |
12 |
13 | @implementation UIGestureRecognizer (Blocks)
14 |
15 | static void * actionKey;
16 |
17 | + (instancetype)flex_action:(GestureBlock)action {
18 | UIGestureRecognizer *gesture = [[self alloc] initWithTarget:nil action:nil];
19 | [gesture addTarget:gesture action:@selector(flex_invoke)];
20 | gesture.flex_action = action;
21 | return gesture;
22 | }
23 |
24 | - (void)flex_invoke {
25 | self.flex_action(self);
26 | }
27 |
28 | - (GestureBlock)flex_action {
29 | return objc_getAssociatedObject(self, &actionKey);
30 | }
31 |
32 | - (void)flex_setAction:(GestureBlock)action {
33 | objc_setAssociatedObject(self, &actionKey, action, OBJC_ASSOCIATION_COPY);
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIMenu+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIMenu+FLEX.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 1/28/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIMenu (FLEX)
12 |
13 | + (instancetype)flex_inlineMenuWithTitle:(NSString *)title
14 | image:(UIImage *)image
15 | children:(NSArray *)children;
16 |
17 | - (instancetype)flex_collapsed;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIMenu+FLEX.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIMenu+FLEX.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 1/28/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "UIMenu+FLEX.h"
10 |
11 | @implementation UIMenu (FLEX)
12 |
13 | + (instancetype)flex_inlineMenuWithTitle:(NSString *)title image:(UIImage *)image children:(NSArray *)children {
14 | return [UIMenu
15 | menuWithTitle:title
16 | image:image
17 | identifier:nil
18 | options:UIMenuOptionsDisplayInline
19 | children:children
20 | ];
21 | }
22 |
23 | - (instancetype)flex_collapsed {
24 | return [UIMenu
25 | menuWithTitle:@""
26 | image:nil
27 | identifier:nil
28 | options:UIMenuOptionsDisplayInline
29 | children:@[[UIMenu
30 | menuWithTitle:self.title
31 | image:self.image
32 | identifier:self.identifier
33 | options:0
34 | children:self.children
35 | ]]
36 | ];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIPasteboard+FLEX.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIPasteboard+FLEX.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/9/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIPasteboard (FLEX)
12 |
13 | /// For copying an object which could be a string, data, or number
14 | - (void)flex_copy:(id)unknownType;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UIPasteboard+FLEX.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIPasteboard+FLEX.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 12/9/19.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "UIPasteboard+FLEX.h"
10 |
11 | @implementation UIPasteboard (FLEX)
12 |
13 | - (void)flex_copy:(id)object {
14 | if (!object) {
15 | return;
16 | }
17 |
18 | if ([object isKindOfClass:[NSString class]]) {
19 | UIPasteboard.generalPasteboard.string = object;
20 | } else if([object isKindOfClass:[NSData class]]) {
21 | [UIPasteboard.generalPasteboard setData:object forPasteboardType:@"public.data"];
22 | } else if ([object isKindOfClass:[NSNumber class]]) {
23 | UIPasteboard.generalPasteboard.string = [object stringValue];
24 | } else {
25 | // TODO: make this an alert instead of an exception
26 | [NSException raise:NSInternalInconsistencyException
27 | format:@"Tried to copy unsupported type: %@", [object class]];
28 | }
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UITextField+Range.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+Range.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 6/13/17.
6 | //
7 |
8 | #import
9 |
10 | @interface UITextField (Range)
11 |
12 | @property (nonatomic, readonly) NSRange flex_selectedRange;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Categories/UITextField+Range.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+Range.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 6/13/17.
6 | //
7 |
8 | #import "UITextField+Range.h"
9 |
10 | @implementation UITextField (Range)
11 |
12 | - (NSRange)flex_selectedRange {
13 | UITextRange *r = self.selectedTextRange;
14 | if (r) {
15 | NSInteger loc = [self offsetFromPosition:self.beginningOfDocument toPosition:r.start];
16 | NSInteger len = [self offsetFromPosition:r.start toPosition:r.end];
17 | return NSMakeRange(loc, len);
18 | }
19 |
20 | return NSMakeRange(NSNotFound, 0);
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Keyboard/FLEXKeyboardHelpViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeyboardHelpViewController.h
3 | // FLEX
4 | //
5 | // Created by Ryan Olson on 9/19/15.
6 | // Copyright © 2015 f. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXKeyboardHelpViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Keyboard/FLEXKeyboardHelpViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeyboardHelpViewController.m
3 | // FLEX
4 | //
5 | // Created by Ryan Olson on 9/19/15.
6 | // Copyright © 2015 f. All rights reserved.
7 | //
8 |
9 | #import "FLEXKeyboardHelpViewController.h"
10 | #import "FLEXKeyboardShortcutManager.h"
11 |
12 | @interface FLEXKeyboardHelpViewController ()
13 |
14 | @property (nonatomic) UITextView *textView;
15 |
16 | @end
17 |
18 | @implementation FLEXKeyboardHelpViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 |
23 | self.textView = [[UITextView alloc] initWithFrame:self.view.bounds];
24 | self.textView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
25 | [self.view addSubview:self.textView];
26 | #if TARGET_OS_SIMULATOR
27 | self.textView.text = FLEXKeyboardShortcutManager.sharedManager.keyboardShortcutsDescription;
28 | #endif
29 | self.textView.backgroundColor = UIColor.blackColor;
30 | self.textView.textColor = UIColor.whiteColor;
31 | self.textView.font = [UIFont boldSystemFontOfSize:14.0];
32 | self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
33 |
34 | self.title = @"Simulator Shortcuts";
35 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(donePressed:)];
36 | }
37 |
38 | - (void)donePressed:(id)sender {
39 | [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Keyboard/FLEXKeyboardShortcutManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXKeyboardShortcutManager.h
3 | // FLEX
4 | //
5 | // Created by Ryan Olson on 9/19/15.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXKeyboardShortcutManager : NSObject
12 |
13 | @property (nonatomic, readonly, class) FLEXKeyboardShortcutManager *sharedManager;
14 |
15 | /// @param key A single character string matching a key on the keyboard
16 | /// @param modifiers Modifier keys such as shift, command, or alt/option
17 | /// @param action The block to run on the main thread when the key & modifier combination is recognized.
18 | /// @param description Shown the the keyboard shortcut help menu, which is accessed via the '?' key.
19 | /// @param allowOverride Allow registering even if there's an existing action associated with that key/modifier.
20 | - (void)registerSimulatorShortcutWithKey:(NSString *)key
21 | modifiers:(UIKeyModifierFlags)modifiers
22 | action:(dispatch_block_t)action
23 | description:(NSString *)description
24 | allowOverride:(BOOL)allowOverride;
25 |
26 | @property (nonatomic, getter=isEnabled) BOOL enabled;
27 | @property (nonatomic, readonly) NSString *keyboardShortcutsDescription;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Runtime/Objc/FLEXRuntimeConstants.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntimeConstants.m
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/11/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXRuntimeConstants.h"
10 |
11 | const unsigned int kFLEXNumberOfImplicitArgs = 2;
12 |
13 | NSString *const kFLEXPropertyAttributeKeyTypeEncoding = @"T";
14 | NSString *const kFLEXPropertyAttributeKeyBackingIvarName = @"V";
15 | NSString *const kFLEXPropertyAttributeKeyReadOnly = @"R";
16 | NSString *const kFLEXPropertyAttributeKeyCopy = @"C";
17 | NSString *const kFLEXPropertyAttributeKeyRetain = @"&";
18 | NSString *const kFLEXPropertyAttributeKeyNonAtomic = @"N";
19 | NSString *const kFLEXPropertyAttributeKeyCustomGetter = @"G";
20 | NSString *const kFLEXPropertyAttributeKeyCustomSetter = @"S";
21 | NSString *const kFLEXPropertyAttributeKeyDynamic = @"D";
22 | NSString *const kFLEXPropertyAttributeKeyWeak = @"W";
23 | NSString *const kFLEXPropertyAttributeKeyGarbageCollectable = @"P";
24 | NSString *const kFLEXPropertyAttributeKeyOldStyleTypeEncoding = @"t";
25 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Runtime/Objc/FLEXRuntimeSafety.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXRuntimeSafety.h
3 | // FLEX
4 | //
5 | // Created by Tanner on 3/25/17.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | #pragma mark - Classes
12 |
13 | extern NSUInteger const kFLEXKnownUnsafeClassCount;
14 | extern const Class * FLEXKnownUnsafeClassList(void);
15 | extern NSSet * FLEXKnownUnsafeClassNames(void);
16 | extern CFSetRef FLEXKnownUnsafeClasses;
17 |
18 | static Class cNSObject = nil, cNSProxy = nil;
19 |
20 | __attribute__((constructor))
21 | static void FLEXInitKnownRootClasses(void) {
22 | cNSObject = [NSObject class];
23 | cNSProxy = [NSProxy class];
24 | }
25 |
26 | static inline BOOL FLEXClassIsSafe(Class cls) {
27 | // Is it nil or known to be unsafe?
28 | if (!cls || CFSetContainsValue(FLEXKnownUnsafeClasses, (__bridge void *)cls)) {
29 | return NO;
30 | }
31 |
32 | // Is it a known root class?
33 | if (!class_getSuperclass(cls)) {
34 | return cls == cNSObject || cls == cNSProxy;
35 | }
36 |
37 | // Probably safe
38 | return YES;
39 | }
40 |
41 | static inline BOOL FLEXClassNameIsSafe(NSString *cls) {
42 | if (!cls) return NO;
43 |
44 | NSSet *ignored = FLEXKnownUnsafeClassNames();
45 | return ![ignored containsObject:cls];
46 | }
47 |
48 | #pragma mark - Ivars
49 |
50 | extern CFSetRef FLEXKnownUnsafeIvars;
51 |
52 | static inline BOOL FLEXIvarIsSafe(Ivar ivar) {
53 | if (!ivar) return NO;
54 |
55 | return !CFSetContainsValue(FLEXKnownUnsafeIvars, ivar);
56 | }
57 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Runtime/Objc/FLEXSwiftInternal.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXSwiftInternal.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 10/28/21.
6 | // Copyright © 2021 Flipboard. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | #ifdef __cplusplus
14 | extern "C" {
15 | #endif
16 |
17 | BOOL FLEXIsSwiftObjectOrClass(id objOrClass);
18 |
19 | #ifdef __cplusplus
20 | }
21 | #endif
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Runtime/Objc/Reflection/FLEXMetadataExtras.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMetadataExtras.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 4/26/22.
6 | //
7 |
8 | #import
9 | #import "FLEXMethodBase.h"
10 | #import "FLEXProperty.h"
11 | #import "FLEXIvar.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /// A dictionary mapping type encoding strings to an array of field titles
16 | extern NSString * const FLEXAuxiliarynfoKeyFieldLabels;
17 |
18 | @protocol FLEXMetadataAuxiliaryInfo
19 |
20 | /// Used to supply arbitrary additional data that need not be exposed by their own properties
21 | - (nullable id)auxiliaryInfoForKey:(NSString *)key;
22 |
23 | @end
24 |
25 | @interface FLEXMethodBase (Auxiliary) @end
26 | @interface FLEXProperty (Auxiliary) @end
27 | @interface FLEXIvar (Auxiliary) @end
28 |
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Runtime/Objc/Reflection/FLEXMetadataExtras.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMetadataExtras.m
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 4/26/22.
6 | //
7 |
8 | #import "FLEXMetadataExtras.h"
9 |
10 | NSString * const FLEXAuxiliarynfoKeyFieldLabels = @"FLEXAuxiliarynfoKeyFieldLabels";
11 |
12 | @implementation FLEXMethodBase (Auxiliary)
13 | - (id)auxiliaryInfoForKey:(NSString *)key { return nil; }
14 | @end
15 |
16 | @implementation FLEXProperty (Auxiliary)
17 | - (id)auxiliaryInfoForKey:(NSString *)key { return nil; }
18 | @end
19 |
20 | @implementation FLEXIvar (Auxiliary)
21 | - (id)auxiliaryInfoForKey:(NSString *)key { return nil; }
22 | @end
23 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Runtime/Objc/Reflection/FLEXMethodBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMethodBase.h
3 | // FLEX
4 | //
5 | // Derived from MirrorKit.
6 | // Created by Tanner on 7/5/15.
7 | // Copyright (c) 2020 FLEX Team. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 |
13 | /// A base class for methods which encompasses those that may not
14 | /// have been added to a class yet. Useful on it's own for adding
15 | /// methods to a class, or building a new class from the ground up.
16 | @interface FLEXMethodBase : NSObject {
17 | @protected
18 | SEL _selector;
19 | NSString *_name;
20 | NSString *_typeEncoding;
21 | IMP _implementation;
22 |
23 | NSString *_flex_description;
24 | }
25 |
26 | /// Constructs and returns a \c FLEXSimpleMethod instance with the given name, type encoding, and implementation.
27 | + (instancetype)buildMethodNamed:(NSString *)name withTypes:(NSString *)typeEncoding implementation:(IMP)implementation;
28 |
29 | /// The selector of the method.
30 | @property (nonatomic, readonly) SEL selector;
31 | /// The selector string of the method.
32 | @property (nonatomic, readonly) NSString *selectorString;
33 | /// Same as selectorString.
34 | @property (nonatomic, readonly) NSString *name;
35 | /// The type encoding of the method.
36 | @property (nonatomic, readonly) NSString *typeEncoding;
37 | /// The implementation of the method.
38 | @property (nonatomic, readonly) IMP implementation;
39 |
40 | /// For internal use
41 | @property (nonatomic) id tag;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/FLEX/Classes/Utility/Runtime/Objc/Reflection/FLEXMethodBase.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXMethodBase.m
3 | // FLEX
4 | //
5 | // Derived from MirrorKit.
6 | // Created by Tanner on 7/5/15.
7 | // Copyright (c) 2020 FLEX Team. All rights reserved.
8 | //
9 |
10 | #import "FLEXMethodBase.h"
11 |
12 |
13 | @implementation FLEXMethodBase
14 |
15 | #pragma mark Initializers
16 |
17 | + (instancetype)buildMethodNamed:(NSString *)name withTypes:(NSString *)typeEncoding implementation:(IMP)implementation {
18 | return [[self alloc] initWithSelector:sel_registerName(name.UTF8String) types:typeEncoding imp:implementation];
19 | }
20 |
21 | - (id)initWithSelector:(SEL)selector types:(NSString *)types imp:(IMP)imp {
22 | NSParameterAssert(selector); NSParameterAssert(types); NSParameterAssert(imp);
23 |
24 | self = [super init];
25 | if (self) {
26 | _selector = selector;
27 | _typeEncoding = types;
28 | _implementation = imp;
29 | _name = NSStringFromSelector(self.selector);
30 | }
31 |
32 | return self;
33 | }
34 |
35 | - (NSString *)selectorString {
36 | return _name;
37 | }
38 |
39 | #pragma mark Overrides
40 |
41 | - (NSString *)description {
42 | if (!_flex_description) {
43 | _flex_description = [NSString stringWithFormat:@"%@ '%@'", _name, _typeEncoding];
44 | }
45 |
46 | return _flex_description;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/FLEXHierarchyViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXHierarchyViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/9/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXNavigationController.h"
10 |
11 | @protocol FLEXHierarchyDelegate
12 | - (void)viewHierarchyDidDismiss:(UIView *)selectedView;
13 | @end
14 |
15 | /// A navigation controller which manages two child view controllers:
16 | /// a 3D Reveal-like hierarchy explorer, and a 2D tree-list hierarchy explorer.
17 | @interface FLEXHierarchyViewController : FLEXNavigationController
18 |
19 | + (instancetype)delegate:(id)delegate;
20 | + (instancetype)delegate:(id)delegate
21 | viewsAtTap:(NSArray *)viewsAtTap
22 | selectedView:(UIView *)selectedView;
23 |
24 | - (void)toggleHierarchyMode;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/FLEXImagePreviewViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXImagePreviewViewController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 6/12/14.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXImagePreviewViewController : UIViewController
12 |
13 | + (instancetype)previewForView:(UIView *)view;
14 | + (instancetype)previewForLayer:(CALayer *)layer;
15 | + (instancetype)forImage:(UIImage *)image;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/SnapshotExplorer/FHSRangeSlider.h:
--------------------------------------------------------------------------------
1 | //
2 | // FHSRangeSlider.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/7/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FHSRangeSlider : UIControl
14 |
15 | @property (nonatomic) CGFloat allowedMinValue;
16 | @property (nonatomic) CGFloat allowedMaxValue;
17 | @property (nonatomic) CGFloat minValue;
18 | @property (nonatomic) CGFloat maxValue;
19 |
20 | @end
21 |
22 | NS_ASSUME_NONNULL_END
23 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/SnapshotExplorer/FHSSnapshotView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FHSSnapshotView.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/7/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FHSViewSnapshot.h"
10 | #import "FHSRangeSlider.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @protocol FHSSnapshotViewDelegate
15 |
16 | - (void)didSelectView:(FHSViewSnapshot *)snapshot;
17 | - (void)didDeselectView:(FHSViewSnapshot *)snapshot;
18 | - (void)didLongPressView:(FHSViewSnapshot *)snapshot;
19 |
20 | @end
21 |
22 | @interface FHSSnapshotView : UIView
23 |
24 | + (instancetype)delegate:(id)delegate;
25 |
26 | @property (nonatomic, weak) id delegate;
27 |
28 | @property (nonatomic) NSArray *snapshots;
29 | @property (nonatomic, nullable) FHSViewSnapshot *selectedView;
30 |
31 | /// Views of these classes will have their headers hidden
32 | @property (nonatomic) NSArray *headerExclusions;
33 |
34 | @property (nonatomic, readonly) UISlider *spacingSlider;
35 | @property (nonatomic, readonly) FHSRangeSlider *depthSlider;
36 |
37 | - (void)emphasizeViews:(NSArray *)emphasizedViews;
38 |
39 | - (void)toggleShowHeaders;
40 | - (void)toggleShowBorders;
41 |
42 | - (void)hideView:(FHSViewSnapshot *)view;
43 |
44 | @end
45 |
46 | NS_ASSUME_NONNULL_END
47 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/SnapshotExplorer/FHSView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FHSView.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/6/20.
6 | //
7 |
8 | #import
9 |
10 | @interface FHSView : NSObject {
11 | @private
12 | BOOL _inScrollView;
13 | }
14 |
15 | + (instancetype)forView:(UIView *)view isInScrollView:(BOOL)inScrollView;
16 |
17 | /// Intentionally not weak
18 | @property (nonatomic, readonly) UIView *view;
19 | @property (nonatomic, readonly) NSString *identifier;
20 |
21 | @property (nonatomic, readonly) NSString *title;
22 | /// Whether or not this view item should be visually distinguished
23 | @property (nonatomic, readwrite) BOOL important;
24 |
25 | @property (nonatomic, readonly) CGRect frame;
26 | @property (nonatomic, readonly) BOOL hidden;
27 | @property (nonatomic, readonly) UIImage *snapshotImage;
28 |
29 | @property (nonatomic, readonly) NSArray *children;
30 | @property (nonatomic, readonly) NSString *summary;
31 |
32 | /// @return importantAttr if .important, otherwise normalAttr
33 | //- (id)ifImportant:(id)importantAttr ifNormal:(id)normalAttr;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/SnapshotExplorer/FHSViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FHSViewController.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/6/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// The view controller
14 | /// "FHS" stands for "FLEX (view) hierarchy snapshot"
15 | @interface FHSViewController : UIViewController
16 |
17 | /// Use this when you want to snapshot a set of windows.
18 | + (instancetype)snapshotWindows:(NSArray *)windows;
19 | /// Use this when you want to snapshot a specific slice of the view hierarchy.
20 | + (instancetype)snapshotView:(UIView *)view;
21 | /// Use this when you want to emphasize specific views on the screen.
22 | /// These views must all be in the same window as the selected view.
23 | + (instancetype)snapshotViewsAtTap:(NSArray *)viewsAtTap selectedView:(UIView *)view;
24 |
25 | @property (nonatomic, nullable) UIView *selectedView;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/SnapshotExplorer/FHSViewSnapshot.h:
--------------------------------------------------------------------------------
1 | //
2 | // FHSViewSnapshot.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/9/20.
6 | // Copyright © 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FHSView.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface FHSViewSnapshot : NSObject
14 |
15 | + (instancetype)snapshotWithView:(FHSView *)view;
16 |
17 | @property (nonatomic, readonly) FHSView *view;
18 |
19 | @property (nonatomic, readonly) NSString *title;
20 | /// Whether or not this view item should be visually distinguished
21 | @property (nonatomic, readwrite) BOOL important;
22 |
23 | @property (nonatomic, readonly) CGRect frame;
24 | @property (nonatomic, readonly) BOOL hidden;
25 | @property (nonatomic, readonly) UIImage *snapshotImage;
26 |
27 | @property (nonatomic, readonly) NSArray *children;
28 | @property (nonatomic, readonly) NSString *summary;
29 |
30 | /// Returns a different color based on whether or not the view is important
31 | @property (nonatomic, readonly) UIColor *headerColor;
32 |
33 | - (FHSViewSnapshot *)snapshotForView:(UIView *)view;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/SnapshotExplorer/Scene/FHSSnapshotNodes.h:
--------------------------------------------------------------------------------
1 | //
2 | // FHSSnapshotNodes.h
3 | // FLEX
4 | //
5 | // Created by Tanner Bennett on 1/7/20.
6 | //
7 |
8 | #import "FHSViewSnapshot.h"
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// Container that holds references to the SceneKit nodes associated with a snapshot.
14 | @interface FHSSnapshotNodes : NSObject
15 |
16 | + (instancetype)snapshot:(FHSViewSnapshot *)snapshot depth:(NSInteger)depth;
17 |
18 | @property (nonatomic, readonly) FHSViewSnapshot *snapshotItem;
19 | @property (nonatomic, readonly) NSInteger depth;
20 |
21 | /// The view image itself
22 | @property (nonatomic, nullable) SCNNode *snapshot;
23 | /// Goes on top of the snapshot, has rounded top corners
24 | @property (nonatomic, nullable) SCNNode *header;
25 | /// The bounding box drawn around the snapshot
26 | @property (nonatomic, nullable) SCNNode *border;
27 |
28 | /// Used to indicate when a view is selected
29 | @property (nonatomic, getter=isHighlighted) BOOL highlighted;
30 | /// Used to indicate when a view is de-emphasized
31 | @property (nonatomic, getter=isDimmed) BOOL dimmed;
32 |
33 | @property (nonatomic) BOOL forceHideHeader;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/TreeExplorer/FLEXHierarchyTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXHierarchyTableViewCell.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 2014-05-02.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FLEXHierarchyTableViewCell : UITableViewCell
12 |
13 | - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier;
14 |
15 | @property (nonatomic) NSInteger viewDepth;
16 | @property (nonatomic) UIColor *randomColorTag;
17 | @property (nonatomic) UIColor *indicatedViewColor;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/Classes/ViewHierarchy/TreeExplorer/FLEXHierarchyTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXHierarchyTableViewController.h
3 | // Flipboard
4 | //
5 | // Created by Ryan Olson on 2014-05-01.
6 | // Copyright (c) 2020 FLEX Team. All rights reserved.
7 | //
8 |
9 | #import "FLEXTableViewController.h"
10 |
11 | @interface FLEXHierarchyTableViewController : FLEXTableViewController
12 |
13 | + (instancetype)windows:(NSArray *)allWindows
14 | viewsAtTap:(NSArray *)viewsAtTap
15 | selectedView:(UIView *)selectedView;
16 |
17 | @property (nonatomic) UIView *selectedView;
18 | @property (nonatomic) void(^didSelectRowAction)(UIView *selectedView);
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/App/CommitListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CommitListViewController.h
3 | // FLEXample
4 | //
5 | // Created by Tanner on 3/11/20.
6 | // Copyright © 2020 Flipboard. All rights reserved.
7 | //
8 |
9 | #import "FLEXFilteringTableViewController.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface CommitListViewController : FLEXFilteringTableViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/App/Person.h:
--------------------------------------------------------------------------------
1 | //
2 | // Person.h
3 | // UICatalog
4 | //
5 | // Created by Tanner on 4/17/19.
6 | // Copyright © 2019 . All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface Person : NSObject
14 |
15 | + (instancetype)bob;
16 |
17 | @property (nonatomic, readonly) NSString *name;
18 | @property (nonatomic, readonly) NSInteger age;
19 | @property (nonatomic, readonly) CGFloat height;
20 | @property (nonatomic, readonly) NSNumber *numberOfKids;
21 |
22 | @property (nonatomic) NSDecimalNumber *netWorth;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/MiscNetworkRequests.h:
--------------------------------------------------------------------------------
1 | //
2 | // MiscNetworkRequests.h
3 | // FLEXample
4 | //
5 | // Created by Tanner on 3/12/20.
6 | // Copyright © 2020 Flipboard. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface MiscNetworkRequests : NSObject
14 |
15 | + (void)sendExampleRequests;
16 |
17 | @property (nonatomic, nullable) NSMutableArray *connections;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // FLEXample
4 | //
5 | // Created by Tanner on 3/11/20.
6 | // Copyright © 2020 Flipboard. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SwiftUI
11 |
12 | @objcMembers @available(iOS 13.0, *)
13 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
14 |
15 | var window: UIWindow?
16 |
17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
18 | if let windowScene = scene as? UIWindowScene {
19 | let window = UIWindow(windowScene: windowScene)
20 | window.rootViewController = FLEXNavigationController(rootViewController: CommitListViewController())
21 | self.window = window
22 | window.makeKeyAndVisible()
23 | }
24 | }
25 |
26 | func sceneDidBecomeActive(_ scene: UIScene) {
27 | FLEXManager.shared.showExplorer()
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Bundle/dogs.realm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Example/FLEXample/Supporting Files/Bundle/dogs.realm
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Bundle/image:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Example/FLEXample/Supporting Files/Bundle/image
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Bundle/image.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Example/FLEXample/Supporting Files/Bundle/image.jpeg
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Bundle/image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Example/FLEXample/Supporting Files/Bundle/image.jpg
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Bundle/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Example/FLEXample/Supporting Files/Bundle/image.png
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Bundle/music_library.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Example/FLEXample/Supporting Files/Bundle/music_library.db
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Bundle/music_library_schema.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Example/FLEXample/Supporting Files/Bundle/music_library_schema.jpg
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/FLEXample-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 | #import
6 | #import "MiscNetworkRequests.h"
7 | #import "CommitListViewController.h"
8 | #import "Person.h"
9 |
--------------------------------------------------------------------------------
/FLEX/Example/FLEXample/Supporting Files/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/FLEX/Example/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '13.0'
2 |
3 | target 'FLEXample' do
4 | project 'FLEXample-Cocoapods'
5 | pod 'FLEX', :path => '../'
6 | end
7 |
--------------------------------------------------------------------------------
/FLEX/Example/Realm/Dog.h:
--------------------------------------------------------------------------------
1 | //
2 | // Dog.h
3 | // UICatalog
4 | //
5 | // Created by Tim Oliver on 17/02/2016.
6 | // Copyright © 2016 Realm. All rights reserved.
7 | //
8 |
9 | #if __has_include()
10 |
11 | #import
12 | #import "Owner.h"
13 |
14 | @interface Dog : RLMObject
15 |
16 | @property NSString *name;
17 | @property CGFloat height;
18 | @property NSDate *birthdate;
19 | @property BOOL vaccinated;
20 | @property Owner *owner;
21 |
22 | @end
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/FLEX/Example/Realm/Dog.m:
--------------------------------------------------------------------------------
1 | //
2 | // Dog.m
3 | // UICatalog
4 | //
5 | // Created by Tim Oliver on 17/02/2016.
6 | // Copyright © 2016 Realm. All rights reserved.
7 | //
8 |
9 | #import "Dog.h"
10 |
11 | #if __has_include()
12 |
13 | @implementation Dog
14 | @end
15 |
16 | #endif
--------------------------------------------------------------------------------
/FLEX/Example/Realm/Owner.h:
--------------------------------------------------------------------------------
1 | //
2 | // Owner.h
3 | // UICatalog
4 | //
5 | // Created by Tim Oliver on 17/02/2016.
6 | // Copyright © 2016 Realm. All rights reserved.
7 | //
8 |
9 | #if __has_include()
10 |
11 | #import
12 |
13 | @interface Owner : RLMObject
14 |
15 | @property NSString *name;
16 |
17 | @end
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/FLEX/Example/Realm/Owner.m:
--------------------------------------------------------------------------------
1 | //
2 | // Owner.m
3 | // UICatalog
4 | //
5 | // Created by Tim Oliver on 17/02/2016.
6 | // Copyright © 2016 Realm. All rights reserved.
7 | //
8 |
9 | #import "Owner.h"
10 |
11 | #if __has_include()
12 |
13 | @implementation Owner
14 | @end
15 |
16 | #endif
--------------------------------------------------------------------------------
/FLEX/FLEX.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/FLEX/FLEXTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/FLEX/FLEXTests/Supporting Files/FLEXNewRootClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNewRootClass.h
3 | // FLEXTests
4 | //
5 | // Created by Tanner on 12/30/20.
6 | // Copyright © 2020 Flipboard. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// Root class with one method
12 | OBJC_ROOT_CLASS
13 | @interface FLEXNewRootClass {
14 | Class isa OBJC_ISA_AVAILABILITY;
15 | }
16 |
17 | - (void)theOnlyMethod;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/FLEX/FLEXTests/Supporting Files/FLEXNewRootClass.m:
--------------------------------------------------------------------------------
1 | //
2 | // FLEXNewRootClass.m
3 | // FLEXTests
4 | //
5 | // Created by Tanner on 12/30/20.
6 | // Copyright © 2020 Flipboard. All rights reserved.
7 | //
8 |
9 | #import "FLEXNewRootClass.h"
10 | #import
11 |
12 | @implementation FLEXNewRootClass
13 |
14 | + (id)alloc {
15 | FLEXNewRootClass *obj = (__bridge id)calloc(1, class_getInstanceSize(self));
16 | object_setClass(obj, self);
17 | return obj;
18 | }
19 |
20 | - (void)theOnlyMethod { }
21 |
22 | - (void)retain { }
23 | - (void)release { }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/FLEX/Graphics/FLEX-Icons.sketch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/FLEX-Icons.sketch
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/audio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/audio.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/audio@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/audio@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/audio@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/audio@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/binary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/binary.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/binary@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/binary@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/binary@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/binary@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/html.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/html@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/html@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/html@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/html@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/js.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/js.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/js@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/js@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/js@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/js@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/json.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/json@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/json@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/json@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/json@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/audio.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/audio.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/binary.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/binary.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/html.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/html.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/js.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/js.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/json.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/json.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/plist.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/plist.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/text.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/text.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/textplain.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/textplain.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/old/video.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/old/video.pxm
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/plist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/plist.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/plist@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/plist@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/plist@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/plist@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/text.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/text@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/text@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/text@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/text@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/textplain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/textplain.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/textplain@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/textplain@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/textplain@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/textplain@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/video.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/video@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/video@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/video@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/video@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/xml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/xml.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/xml@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/xml@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/filetypes/xml@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/filetypes/xml@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/images_to_hex.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/bash
2 |
3 | # Converts every image *.png to *.txt as an ASCII hex representation of the image.
4 | #
5 | # This script simply runs image_to_code.py on each of the folders containing
6 | # our images and writes the hex of each image to a text file. Instead of updating
7 | # the original script, I left it to be generic as it was originally intended
8 | # in case someone else finds it useful. The original python script outputs
9 | # header and implementation files, which this script removes after it is run.
10 | #
11 | # Run this command to remove the hex files: find . -type f -name "*.txt" | xargs rm
12 | #
13 | # Usage: ./images_to_hex.sh [one or more folders in a quoted string]
14 | # Examples:
15 | # bash images_to_hex.sh
16 | # bash images_to_hex.sh toolbar
17 | # bash images_to_hex.sh "toolbar filetypes"
18 | #
19 |
20 | if [[ $1 ]]; then
21 | imageFolders="$1"
22 | else
23 | imageFolders="filetypes range-slider toolbar misc"
24 | fi
25 |
26 | for dir in $imageFolders; do
27 | rm $dir/*.txt
28 | for image in `ls $dir`; do
29 | name=`basename $image .png`
30 | outfile=$dir/$name.txt
31 | echo "Output file: $outfile"
32 | ./image_to_code.py -i $dir/$image -c $name > "$outfile"
33 | done
34 | done
35 |
36 | rm -rf *PNG.[hm]
37 |
--------------------------------------------------------------------------------
/FLEX/Graphics/iterate_hex_to_pasteboard.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/bash
2 |
3 | # I use this script to loop over the contents of each text file
4 | # produced by images_to_hex.sh and copy it to the clipboard.
5 | # This makes adding or updating graphics to the project faster.
6 | #
7 | # You can edit the $folder variable below to work in a certain
8 | # subdirectory, and you can edit the wildcard expression below
9 | # to only work with a certain image size, like "*@3x.txt"
10 |
11 | folder=.
12 | for file in `find $folder -type f -name "*.txt"`; do
13 | cat $file | pbcopy
14 | read -p "Copied $file, press any key to continue..."
15 | done
16 |
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/bookmarks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/bookmarks.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/bookmarks@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/bookmarks@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/bookmarks@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/bookmarks@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/checker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/checker.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/checker@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/checker@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/checker@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/checker@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/gear.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/gear@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/gear@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/gear@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/gear@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/more.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/more@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/more@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/more@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/more@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/scrolldown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/scrolldown.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/scrolldown@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/scrolldown@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/scrolldown@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/scrolldown@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/tabs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/tabs.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/tabs@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/tabs@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/tabs@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/tabs@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/toggle2D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/toggle2D.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/toggle2D@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/toggle2D@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/toggle2D@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/toggle2D@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/toggle3D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/toggle3D.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/toggle3D@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/toggle3D@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/misc/toggle3D@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/misc/toggle3D@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/fill.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/fill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/fill@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/fill@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/fill@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/left_handle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/left_handle.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/left_handle@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/left_handle@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/left_handle@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/left_handle@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/right_handle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/right_handle.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/right_handle@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/right_handle@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/right_handle@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/right_handle@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/track.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/track.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/track@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/track@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/range-slider/track@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/range-slider/track@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/close.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/close@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/close@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/close@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/close@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/dragHandle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/dragHandle.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/dragHandle@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/dragHandle@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/dragHandle@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/dragHandle@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/move.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/move.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/move@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/move@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/move@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/move@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/recent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/recent.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/recent@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/recent@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/recent@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/recent@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/select.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/select@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/select@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/select@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/select@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/views.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/views.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/views@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/views@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/views@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/views@3x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/wrench.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/wrench.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/wrench@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/wrench@2x.png
--------------------------------------------------------------------------------
/FLEX/Graphics/toolbar/wrench@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/FLEX/Graphics/toolbar/wrench@3x.png
--------------------------------------------------------------------------------
/LatestBuild:
--------------------------------------------------------------------------------
1 | /Users/xiaoyuan/Library/Developer/Xcode/DerivedData/TikTok-fdqllwbbfvkmsuhcuddgqwuguoez/Build/Products/Debug-iphoneos
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TikTok Tweaks
2 | 基于MonkeyDev、TikTok 版本29.7.0、 iOS 16、Xcode14.3
3 |
4 | ## 功能
5 | - 下载无水印视频: 长按弹出的视图,点击保存原版视频可下载无水印视频,新版本下载的是h264的视频更清晰!
6 | - 跳过广告
7 | - 视频播放完成自动播放下一条
8 | - 解锁sim 地区限制,国家默认为日本,可在设置-规则中切换国家
9 | - 开启纯模式,屏蔽视频播放器以外的视图层
10 | - 可绕过 SSL pinning,对HTTPS 进行抓包,目前对抖音的有效
11 | - 摇一摇打开设置页面,再次摇一摇关闭设置
12 |
13 | 经调试,大部分功能的代码适用抖音,观看视频还需要挂梯子,我记得去年的版本不需要的。本仓库仅仅是用来学习TikTok中的技术栈,TK中的反调试机制可能会对账号进行限制, 如果喜欢刷TK的建议去美区下载正版,拔卡挂梯子使用。
14 |
15 |
16 | TikTok-29.7.0 ipa 链接:https://pan.baidu.com/s/1SFP0FZD1PzHSJKR-iS3yPw 密码:w3c0
17 |
--------------------------------------------------------------------------------
/TikTok.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TikTok.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TikTok/Scripts/quick-resign.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Usage
4 | # Must be an absolute path
5 |
6 | # ./quick-resign.sh [insert] "origin.ipa path" "resign.ipa path"
7 |
8 | INSERT_DYLIB=NO
9 | INPUT_PATH=$1
10 | OUTPUT_PATH=$2
11 |
12 | if [[ $1 == "insert" ]];then
13 | INSERT_DYLIB=YES
14 | INPUT_PATH=$2
15 | OUTPUT_PATH=$3
16 | fi
17 |
18 | if [[ ! $OUTPUT_PATH ]];then
19 | OUTPUT_PATH=$PWD
20 | fi
21 |
22 | cp -rf $INPUT_PATH ../TargetApp/
23 | cd ../../
24 | xcodebuild MONKEYDEV_INSERT_DYLIB=$INSERT_DYLIB | xcpretty
25 | cd LatestBuild
26 | ./createIPA.command
27 | cp -rf Target.ipa $OUTPUT_PATH
28 | exit 0
--------------------------------------------------------------------------------
/TikTok/TargetApp/put ipa or app here:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/TikTok/TargetApp/put ipa or app here
--------------------------------------------------------------------------------
/TikTok/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/TikTok/icon.png
--------------------------------------------------------------------------------
/TikTokDylib/Config/MDConfigManager.m:
--------------------------------------------------------------------------------
1 | // weibo: http://weibo.com/xiaoqing28
2 | // blog: http://www.alonemonkey.com
3 | //
4 | // MDConfigManager.m
5 | // MonkeyDev
6 | //
7 | // Created by AloneMonkey on 2018/4/24.
8 | // Copyright © 2018年 AloneMonkey. All rights reserved.
9 | //
10 |
11 | #define CONFIG_FILE_NAME @"MDConfig"
12 |
13 | #import "MDConfigManager.h"
14 |
15 | @implementation MDConfigManager{
16 | NSString* _filepath;
17 | }
18 |
19 | + (instancetype)sharedInstance{
20 | static MDConfigManager *sharedInstance = nil;
21 | if (!sharedInstance){
22 | sharedInstance = [[MDConfigManager alloc] init];
23 | }
24 | return sharedInstance;
25 | }
26 |
27 | - (BOOL)isActive{
28 | _filepath = [[NSBundle mainBundle] pathForResource:CONFIG_FILE_NAME ofType:@"plist"];
29 | if(_filepath == nil){
30 | return NO;
31 | }
32 | return YES;
33 | }
34 |
35 | - (NSDictionary*) readConfigByKey:(NSString*) key{
36 | if([self isActive]){
37 | NSDictionary* contentDict = [NSDictionary dictionaryWithContentsOfFile:_filepath];
38 | if([contentDict.allKeys containsObject:key]){
39 | return contentDict[key];
40 | }else{
41 | return nil;
42 | }
43 | }else{
44 | return nil;
45 | }
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/TikTokDylib/Config/MDCycriptManager.h:
--------------------------------------------------------------------------------
1 | // weibo: http://weibo.com/xiaoqing28
2 | // blog: http://www.alonemonkey.com
3 | //
4 | // MDCycriptManager.h
5 | // MonkeyDev
6 | //
7 | // Created by AloneMonkey on 2018/3/8.
8 | // Copyright © 2018年 AloneMonkey. All rights reserved.
9 | //
10 |
11 | #ifndef __OPTIMIZE__
12 |
13 | #import
14 |
15 | #define PORT 6666
16 |
17 | @interface MDCycriptManager : NSObject
18 |
19 | + (instancetype)sharedInstance;
20 |
21 |
22 | /**
23 | Download script by config.plist
24 |
25 | @param update Force update of all scripts
26 | */
27 | -(void)loadCycript:(BOOL) update;
28 |
29 | /**
30 | eval javascript by cycript
31 |
32 | @param cycript javascript string
33 | @param error error happened
34 | @return eval result
35 | */
36 | -(NSString*)evaluateCycript:(NSString*) cycript error:(NSError **) error;
37 |
38 | @end
39 |
40 | #endif
--------------------------------------------------------------------------------
/TikTokDylib/Config/MDMethodTrace.h:
--------------------------------------------------------------------------------
1 | // weibo: http://weibo.com/xiaoqing28
2 | // blog: http://www.alonemonkey.com
3 | //
4 | // MDMethodTrace.h
5 | // MonkeyDev
6 | //
7 | // Created by AloneMonkey on 2017/9/7.
8 | // Copyright © 2017年 AloneMonkey. All rights reserved.
9 | //
10 |
11 | #ifndef MethodTrace_h
12 | #define MethodTrace_h
13 |
14 | #define TRACE_README @"\n📚--------------------OCMethodTrace(Usage)-------------------📚\nhttps://github.com/omxcodec/OCMethodTrace/blob/master/README.md\n📚--------------------OCMethodTrace(Usage)-------------------📚"
15 |
16 | #import
17 |
18 | @interface MDMethodTrace : NSObject
19 |
20 | + (instancetype)sharedInstance;
21 |
22 | - (void)addClassTrace:(NSString *) className;
23 |
24 | - (void)addClassTrace:(NSString *)className methodName:(NSString *)methodName;
25 |
26 | - (void)addClassTrace:(NSString *)className methodList:(NSArray *)methodList;
27 |
28 | @end
29 |
30 | #endif /* MethodTrace_h */
31 |
--------------------------------------------------------------------------------
/TikTokDylib/Source/Common/UIDebuggingTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIDebuggingTool.h
3 | // xinzhuxianDylib
4 | //
5 | // Created by xiaoyuan on 2019/11/21.
6 | // Copyright © 2019 寻宝天行. All rights reserved.
7 | //
8 |
9 | #if DEBUG
10 |
11 | #import
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | FOUNDATION_EXPORT NSString *const UIEventSubtypexy_motionShakeNotification;
16 |
17 | @interface UIDebuggingTool : NSObject
18 |
19 |
20 | + (instancetype)manager;
21 |
22 | + (void)toggleVisibility;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
28 | #endif
29 |
30 |
--------------------------------------------------------------------------------
/TikTokDylib/Source/Resource/iconPersonalSettingArrow_18x18_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/TikTokDylib/Source/Resource/iconPersonalSettingArrow_18x18_@2x.png
--------------------------------------------------------------------------------
/TikTokDylib/Source/Resource/icon_discovery_favi@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/TikTokDylib/Source/Resource/icon_discovery_favi@2x.png
--------------------------------------------------------------------------------
/TikTokDylib/Source/Resource/icon_discovery_favi@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tuxi/TikTok-Tweaks/d647b4dfdc2a417d5f2fc51baca7c70146534992/TikTokDylib/Source/Resource/icon_discovery_favi@3x.png
--------------------------------------------------------------------------------
/TikTokDylib/Source/Settings/Carrier.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Carrier.swift
3 | // TikTokDylib
4 | //
5 | // Created by xiaoyuan on 2021/10/10.
6 | //
7 |
8 | import Foundation
9 |
10 | @objc(XYCarrier)
11 | @objcMembers class Carrier: NSObject, Codable {
12 | var area: String
13 | var code: String
14 | var mcc: String
15 | var mnc: String
16 |
17 | init(area: String, code: String, mcc: String, mnc: String) {
18 | self.area = area
19 | self.code = code
20 | self.mcc = mcc
21 | self.mnc = mnc
22 | super.init()
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/TikTokDylib/Source/Settings/SettingsSection.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SettingsSection.swift
3 | // TikTokDylib
4 | //
5 | // Created by xiaoyuan on 2021/10/26.
6 | //
7 |
8 | import Foundation
9 |
10 | enum SettingsSection {
11 | case basic(title: String, items: [Item])
12 | case area(title: String, items: [Item])
13 |
14 | enum Item {
15 | case normal(title: String, onNext: (() -> Void)?)
16 | case `switch`(title: String, isOn: Bool, isEnabled: Bool = true, onChanged: ((Bool) -> Void)?)
17 | case area(carrier: Carrier, isSelected: Bool)
18 | }
19 | }
20 |
21 | extension SettingsSection {
22 | var items: [Item] {
23 | switch self {
24 | case .basic(_, let items):
25 | return items
26 | case .area(_, let items):
27 | return items
28 | }
29 | }
30 |
31 | var title: String {
32 | switch self {
33 | case .basic(let title, _):
34 | return title
35 | case .area(let title, _):
36 | return title
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/TikTokDylib/Source/Settings/TikTokDylib-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 | #import "TikTokHeaders.h"
6 | #import "MBProgressHUD.h"
7 |
--------------------------------------------------------------------------------
/TikTokDylib/TikTokDylib-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'TikTokDylib' target in the 'TikTokDylib' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #import "/opt/theos/Prefix.pch" //path/to/theos/Prefix.pch
8 | #endif
9 |
--------------------------------------------------------------------------------
/TikTokDylib/TikTokDylib.h:
--------------------------------------------------------------------------------
1 | // weibo: http://weibo.com/xiaoqing28
2 | // blog: http://www.alonemonkey.com
3 | //
4 | // TikTokDylib.h
5 | // TikTokDylib
6 | //
7 | // Created by xiaoyuan on 2021/10/1.
8 | // Copyright (c) 2021 ___ORGANIZATIONNAME___. All rights reserved.
9 | //
10 |
11 | #import
12 |
13 | #define INSERT_SUCCESS_WELCOME " 🎉!!!congratulations!!!🎉\n👍----------------insert dylib success----------------👍\n"
14 |
15 |
--------------------------------------------------------------------------------
/TikTokDylib/Tools/LLDBTools.h:
--------------------------------------------------------------------------------
1 | // weibo: http://weibo.com/xiaoqing28
2 | // blog: http://www.alonemonkey.com
3 | //
4 | // LLDBTools.h
5 | // MonkeyDev
6 | //
7 | // Created by AloneMonkey on 2018/3/8.
8 | // Copyright © 2018年 AloneMonkey. All rights reserved.
9 | //
10 |
11 | #import
12 | #import
13 |
14 | //(lldb) po pviews()
15 |
16 | NSString* pvc(void);
17 |
18 | NSString* pviews(void);
19 |
20 | NSString* pactions(vm_address_t address);
21 |
22 | NSString* pblock(vm_address_t address);
23 |
24 | NSString* methods(const char * classname);
25 |
26 | NSString* ivars(vm_address_t address);
27 |
28 | NSString* choose(const char* classname);
29 |
30 | NSString* vmmap();
31 |
--------------------------------------------------------------------------------
/TikTokDylib/Trace/OCSelectorTrampolines.h:
--------------------------------------------------------------------------------
1 | /*
2 | * OCSelectorTrampolines.mm
3 | * OCMethodTrace
4 | *
5 | * https://github.com/omxcodec/OCMethodTrace.git
6 | *
7 | * Copyright (C) 2018 Michael Chen
8 | *
9 | * Licensed under the Apache License, Version 2.0 (the "License");
10 | * you may not use this file except in compliance with the License.
11 | * You may obtain a copy of the License at
12 | *
13 | * http://www.apache.org/licenses/LICENSE-2.0
14 | *
15 | * Unless required by applicable law or agreed to in writing, software
16 | * distributed under the License is distributed on an "AS IS" BASIS,
17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | * See the License for the specific language governing permissions and
19 | * limitations under the License.
20 | */
21 |
22 | #import
23 |
24 | FOUNDATION_EXTERN IMP imp_implementationWithSelector(SEL aSel, const char *signature);
25 | FOUNDATION_EXTERN SEL imp_getSelector(IMP anImp);
26 | FOUNDATION_EXTERN BOOL imp_removeSelector(IMP anImp);
27 |
--------------------------------------------------------------------------------
/TikTokDylib/Trace/selectortramps.mac:
--------------------------------------------------------------------------------
1 | /*
2 | * selectortramps.mac
3 | * OCMethodTrace
4 | *
5 | * https://github.com/omxcodec/OCMethodTrace.git
6 | *
7 | * Copyright (C) 2018 Michael Chen
8 | *
9 | * Licensed under the Apache License, Version 2.0 (the "License");
10 | * you may not use this file except in compliance with the License.
11 | * You may obtain a copy of the License at
12 | *
13 | * http://www.apache.org/licenses/LICENSE-2.0
14 | *
15 | * Unless required by applicable law or agreed to in writing, software
16 | * distributed under the License is distributed on an "AS IS" BASIS,
17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | * See the License for the specific language governing permissions and
19 | * limitations under the License.
20 | */
21 |
22 | #ifdef __x86_64__
23 | #define PRELOAD(x,f) movq x@GOTPCREL(%rip), %r10;
24 | #define LABEL_ADDR(x,f) %r10
25 | #define LABEL_VALUE(x,f) (%r10)
26 | #define INIT_PIC(f)
27 | #define END_PIC(f)
28 | #elif __i386__
29 | #define PRELOAD(x,f) leal x-L0## f ##$pb(%ebx), %eax;
30 | #define LABEL_ADDR(x,f) %eax
31 | #define LABEL_VALUE(x,f) (%eax)
32 | #define INIT_PIC(x) \
33 | push %ebx; \
34 | call L0## x ##$pb; \
35 | L0## x ##$pb:; \
36 | pop %ebx;
37 | #define END_PIC(x) pop %ebx
38 | #endif
39 |
--------------------------------------------------------------------------------
/manifest.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | items
6 |
7 |
8 | assets
9 |
10 |
11 | kind
12 | software-package
13 | url
14 | https://oss.objc.com/ipa/TikTok/TikTok.ipa
15 |
16 |
17 | kind
18 | display-image
19 | url
20 | https://digits.oss-cn-beijing.aliyuncs.com/Aweme/20.10.0/custom/57x57.png
21 |
22 |
23 | kind
24 | full-size-image
25 | url
26 | https://digits.oss-cn-beijing.aliyuncs.com/Aweme/20.10.0/custom/512x512.png
27 |
28 |
29 | metadata
30 |
31 | bundle-identifier
32 | com.objc.TikTok
33 | bundle-version
34 | 1.0.0
35 | kind
36 | software
37 | platform-identifier
38 | com.apple.platform.iphoneos
39 | title
40 | TikTok
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------