TBRuntime.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // TBRuntime.h
  3. // TBTweakViewController
  4. //
  5. // Created by Tanner on 3/22/17.
  6. // Copyright © 2017 Tanner Bennett. All rights reserved.
  7. //
  8. #import "TBToken.h"
  9. @class FLEXMethod;
  10. /// Accepts runtime queries given a token.
  11. @interface TBRuntime : NSObject
  12. + (instancetype)runtime;
  13. /// Called automatically when \c TBRuntime is first used.
  14. /// You may call it again when you think a library has
  15. /// been loaded since this method was first called.
  16. - (void)reloadLibrariesList;
  17. /// An array of strings representing the currently loaded libraries.
  18. @property (nonatomic, readonly) NSArray<NSString*> *imageDisplayNames;
  19. - (NSString *)shortNameForImageName:(NSString *)imageName;
  20. /// @return Bundle names for the UI
  21. - (NSMutableArray<NSString*> *)bundleNamesForToken:(TBToken *)token;
  22. /// @return Bundle paths for more queries
  23. - (NSMutableArray<NSString*> *)bundlePathsForToken:(TBToken *)token;
  24. /// @return Class names
  25. - (NSMutableArray<NSString*> *)classesForToken:(TBToken *)token inBundles:(NSMutableArray<NSString*> *)bundlePaths;
  26. /// @return Actual methods
  27. - (NSMutableArray<FLEXMethod*> *)methodsForToken:(TBToken *)token
  28. instance:(NSNumber *)onlyInstanceMethods
  29. inClasses:(NSMutableArray<NSString*> *)classes;
  30. @end