Some customisation APIs
- Dominant language
- Objective-C
- Stars
- 14.6k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Hi! First of all great work with the latest release, we've been using FLEX for a while and I'm so happy it keeps being maintained.
I wanted to raise this issue to discuss the potential inclusion of some more customisation APIs. I've added a bunch of extra screens tailored to our App and I had to do some workarounds for them, maybe is worth adding some stuff to the public API.

Maybe some of it is already doable and I just haven't found the way of doing it, that's entirely possible 😅
## Menu order
I would like to be able to change the order or even enable/disable what's available on the menu.
We use our own tools much more than a lot of the runtime screens for example, that and the network log ^^ So it would be nice to be able to change the order of the menu to put at the top what's most used.
*I've seen 4.0 has bookmarks, but is not clear to me how to adopt that in our custom tools. And I'm still not sure that it would be as nice as being able to change the order for us.*
UPDATE: Custom tools have been moved to the top https://github.com/FLEXTool/FLEX/pull/439
# Support "actions"
Some of the "tools" that we have simply perform an action, there is no need to show any screen. But right now FLEX only lets us register a block that must return an object or a viewController.
I'm using the dirty trick of returning a viewController that auto-hides itself, it kinda works but the UI breaks a bit every time (specially since iOS 13 new modals).
```
@implementation FlexDebugAutoHideViewController
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.navigationController popViewControllerAnimated:NO];
}
@end
```
It would be better to have an API that allowed to register a global entry to just execute a closure. (+ shortcut, see below)
*and I sometimes wished to have some of those actions available on the floating bar directly*
# Support modal presentation
This may be a minor one, but some custom screens are easier to work with if they're modally presented. Right now I need to use the previous workaround + reach into the `topViewController` of the app to present it manually.
*I did this years ago so maybe I could reconsider and just use push instead, I'm just writing it here for completeness.*
# Support simulator shortcuts on every other register method.
For any custom tool that we add we usually want to have a quick access to it in the simulator. Right now I have to rely on registering the action/screen with my custom methods and inside them follow up to registerSimulatorShortcutWithKey.
If would be nice if the existing `registerGlobalEntryWithName` would accept a shortcut key too.
----
That's it :)
I'm maintaining this in our own extension of FLEX so is not a big deal to keep it that way. But I've been doing for a long time and thought it would be worth raising it just in case it could benefit other people.
Thank you.
Contributor guide
Assessment
This issue has not been assessed yet.