From afabb9b1c9706da3fbc8a547b3623607b00ca659 Mon Sep 17 00:00:00 2001 From: Ian Leitch Date: Thu, 4 Jan 2024 10:27:54 +0000 Subject: [PATCH] Retain 'NSPrincipalClass' and 'WKExtensionDelegateClassName' in plists --- CHANGELOG.md | 1 + Sources/PeripheryKit/Indexer/InfoPlistParser.swift | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be025da94..ce58ea33a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ - Fix public accessibility analysis false-positive for enum case parameter types. - Fix public accessibility analysis false-positive for properties initialized with generic specialized types. - Types associated with assign-only properties are no longer identified as unused until the property is removed. +- Classes referenced in Info.plist as `NSPrincipalClass` and `WKExtensionDelegateClassName` are now retained. ## 2.17.1 (2023-12-04) diff --git a/Sources/PeripheryKit/Indexer/InfoPlistParser.swift b/Sources/PeripheryKit/Indexer/InfoPlistParser.swift index 60d46607d..3d9a3438b 100644 --- a/Sources/PeripheryKit/Indexer/InfoPlistParser.swift +++ b/Sources/PeripheryKit/Indexer/InfoPlistParser.swift @@ -4,7 +4,9 @@ import AEXML import Shared final class InfoPlistParser { - private static let elements = ["UISceneClassName", "UISceneDelegateClassName", "NSExtensionPrincipalClass", "CLKComplicationPrincipalClass"] + private static let elements = [ + "UISceneClassName", "UISceneDelegateClassName", "NSPrincipalClass", + "NSExtensionPrincipalClass", "CLKComplicationPrincipalClass", "WKExtensionDelegateClassName"] private let path: FilePath required init(path: FilePath) {