If you return MyExample.storyboard instead of MyExample from catalogStoryboardName this will assert.
We could be a bit more forgiving and truncate any .storyboard if it exists in the returned string.
On MDCCatalog, with 10.3 simulator (Xocde 8.3 Beta 1-5), running Reveal via breakpoint injection, it will crash when asking WebKit classes if they respond to selector (during the navigation tree creation.)
if ([aClass respondsToSelector:selector])
Workaround:
Ignore classes starting with "WK". Not a true solution but will work until a solution.
NSArray<Class> *CBCClassesRespondingToSelector(NSArray<Class> *classes, SEL selector) {
NSMutableArray<Class> *filteredClasses = [NSMutableArrayarray];
for (Class aClass in classes) {
NSString *catch = NSStringFromClass(aClass);
if ([catch containsString:@"WK"]) {
continue;
}
if ([aClass respondsToSelector:selector]) {
[filteredClasses addObject:aClass];
}
}
return filteredClasses;
}
Currently, to add new metadata to examples we need to add new APIs to the library and cut a release, e.g. #24.
If we had a more generalized mechanism for defining example metadata then we would be able to move all metadata definitions into the downstream apps. This would mean fewer releases of catalog by convention.
For example, one possible solution is to define an + catalogMetadata API that returns a dictionary. The app could then define keys it expects examples to implement.
There have been reports that app startup time is noticeably degraded in complex apps that make use of the catalog by convention. It's decently likely that our enumeration of the runtime is playing a part in this.
The "convention" aspect of this library is a side effect of the included tech. What this library is, at its simplest, is a runtime lookup of view controllers that respond to specific selectors and the construction of a navigable view controller hierarchy.
It's possible to use this library without enforcing a file system convention. The README should explain this simpler use case and then demonstrate how to use a file system convention in a follow-up guide.
if (![aClass isSubclassOfClass:[UIViewController class]]) {
Our app crashes upon start in the sim (the same occurs on an actual device running iOS 12 beta). The stacktrace shows that it fails within isSubclassOfClass with EXC_BAD_INSTRUCTION.
The CBC cells (main list/tiles) are not accessibility elements. VoiceOver users can only tap on the labels within each cell. Instead, the entire cell should be the accessibility element and should provide the values/labels/traits of the label and act as a button.