Why not just download the file that exists at https://site.com/fav.ico? There are multiple places that a developer can place there favicon, not just at the root directory with the specific filename of fav.ico. FaviconFinder handles the dirty work for you and iterates through the numerous locations that the favicon could be located at, and simply delivers the image to you in a closure, once the image is found.
- Detect the favicon in the root directory
- Will automatically check if the favicon is located within the root URL if the subdomain failed (Will check https://site.com/fav.ico if https://subdomain.site.com/fav.ico fails)
- Detect and parse the HTML at the URL for the declaration of the favicon
FaviconFinder is a tiny, pure Swift library designed for iOS and macOS applications that allows you to detect favicons used by a website.
Favicon Finder uses Swift 5.0, and runs for the iOS and macOS platform.
The Favicon Finder project uses the MIT licence, and is hosted on Github.
Favicon Finder supports CocoaPods, Carthage and Swift Package Manager.