In this chapter, we created an application that can help us position our website by checking its word frequency, but as you might know, SEO is not only about counting words, it's also about website links.
In this recipe, we will check the links on a website; in this case, as we are using the networks, we can do tasks in parallel.
Create a project called Chapter 5 weblinks
and add a file called LinkChecker.swift
. Please check whether you have an Internet connection on your simulator or device.
Once you have checked that your device or simulator has an Internet connection, follow these steps to create the Link Checker app:
Before we start creating the
LinkChecker
class, we will need to create an auxiliary class that will store the common information between objects of the typeLinkChecker
. This class will be calledUrlManager
and this needs to store the queue, a file handler to log the found URLs, an array with the URLs, and a constant to indicate...