Skip to content

Conversation

@duckSern1108
Copy link

@duckSern1108 duckSern1108 commented Nov 22, 2025

Why?

Currently if image is used only be refer to generated asset symbols from Xcode, FengNiao is identifying as unused although this image is currently used in project like in this issue.
Screenshot 2025-11-22 at 18 07 17

What changed?

  • Add new search rule for Swift file to search for potential generated asset symbols access
  • Add addtional code for filterUnused, convert resource name to camelCase then check with above potential case

Testing

I'm testing with my own project

let countryViews = [
    CountryView(position: .mid, img: .icNigeria),
    CountryView(position: .right, img: .icJapan),
    CountryView(position: .left, img: .icEngland),
    CountryView(position: .right, img: .icArgentina),
    CountryView(position: .left, img: .icBrazil),
]

final class CountryView: UIView {
    enum Position {
        case left
        case mid
        case right
    }
    
    var position: Position = .left
    var img: UIImage? = nil
    var pinPoint = UIView()
    
    
    init(position: Position, img: UIImage?) {
        self.position = position
        self.img = img
        super.init(frame: .zero)
    }
}

Before:

Screenshot 2025-11-22 at 18 18 56

After:
Screenshot 2025-11-22 at 18 18 17

@duckSern1108 duckSern1108 changed the title Add check unuse for generated asset symbols Add check unuse for Xcode generated asset symbols Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant