periphery
periphery copied to clipboard
False positive: NSPrincipalClass key is ignored
Summary
Setting a custom principal class (as declared in the Info.plist file under the NSPrincipalClass key) is not recognized by Periphery.
This means it can report the class as being unused, even though the class is instantiated by the system on app launch.
Reproducing
- Create a new Storyboard/Swift app
- Create a
UIApplicationorNSApplicationsubclass - In the project's build settings, set “Principal Class” to your class (in the
ModuleName.ClassNameform) - Run periphery: it reports the class as unused