woshiccm / Pecker

CodePecker is a tool to detect unused Swift code.
MIT License
1.46k stars 63 forks source link

False Positive - Extension Principle Class #9

Closed Sherlouk closed 4 years ago

Sherlouk commented 4 years ago

If you have an extension (such as a Notification Service Extension) then you end up with a class called NotificationService (this can be changed).

Apple knows to run this because of an entry in the Info.plist "NSExtensionPrincipalClass" which equals "$(PRODUCT_MODULE_NAME).NotificationService".

Pecker is raising a warning for this main class, but it is in fact being used.

woshiccm commented 4 years ago

Will take a look at it

woshiccm commented 4 years ago

Done, PR: https://github.com/woshiccm/Pecker/pull/28