A simple counter for UIApplication's NetworkActivityIndicator. Use the addActivity method before a request to increase the counter and show the application's network activity indicator. After a request finishes, decrease the counter using the removeActivity method. If the counter reaches 0, the network activity indicator will be hidden.
- Select File > Swift Packages > Add Package Dependency. Enter
https://github.com/alphatroya/NetworkActivityIndicatorManagerin the "Choose Package Repository" dialog. - In the next page, specify the version resolving rule as "Up to Next Major" with "2.0" as its earliest version.
- After Xcode checking out the source and resolving the version, you can choose the "NetworkActivityIndicatorManager" library and add it to your app target.