Description
Digger is a lightweight download framework that requires only one line of code to complete the file download task.
Based on URLSession, pure Swift language implementation, support chain syntax call, real-time download progress, real-time download speed, breakpoint download.
The user forces the app to be shut down, for example by sliding off the app.
Digger can still resume downloading tasks.
Digger alternatives and similar libraries
Based on the "Network" category.
Alternatively, view Digger alternatives based on common mentions on social networks and blogs.
-
Perfect
Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and moreβ¦) -
Reachability.swift
Replacement for Apple's Reachability re-written in Swift with closures -
SwiftSoup
SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS) -
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! π¦ -
SwiftHTTP
Thin wrapper around NSURLSession in swift. Simplifies HTTP requests. -
APIKit
Type-safe networking abstraction layer that associates request type with response type. -
Swifton
A Ruby on Rails inspired Web Framework for Swift that runs on Linux and OS X -
Zewo
Lightweight library for web server applications in Swift on macOS and Linux powered by coroutines. -
ResponseDetective
Sherlock Holmes of the networking layer. :male_detective: -
SwiftWebSocket
A high performance WebSocket client library for swift. -
BlueSocket
Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. -
Connectivity
π Makes Internet connectivity detection more robust by detecting Wi-Fi networks without Internet access. -
WKZombie
WKZombie is a Swift framework for iOS/OSX to navigate within websites and collect data without the need of User Interface or API, also known as Headless browser. It can be used to run automated tests / snapshots and manipulate websites using Javascript. -
Pitaya
π A Swift HTTP / HTTPS networking library just incidentally execute on machines -
Express
Swift Express is a simple, yet unopinionated web application server written in Swift -
PeerKit
An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps -
Heimdallr.swift
Easy to use OAuth 2 library for iOS, written in Swift. -
Socks
π Non-blocking TCP socket layer, with event-driven server and client. -
Embassy
Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux -
Reach
A simple class to check for internet connection availability in Swift. -
SOAPEngine
This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and AppleTV app. -
SwiftyOAuth
A simple OAuth library for iOS with a built-in set of providers -
XcodeServerSDK
Access Xcode Server API with native Swift objects. -
BigBrother
Automatically sets the network activity indicator for any performed request.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Digger or a related project?
Popular Comparisons
README
Digger is a lightweight download framework that requires only one line of code to complete the file download task.
Based on URLSession, pure Swift language implementation, support chain syntax call, real-time download progress, real-time download speed, breakpoint download.
The user forces the app to be shut down, for example by sliding off the app. Digger can still resume downloading tasks.
Features:
- Large file download
- Multi thread Download
- Thread safety
- Breakpoint downloading
- Controllable concurrency
Requirements"
- iOS 8.0+
- Xcode 9.0+
- Swift 4.0+ ## Installation
CocoaPods
Add to your Podfile:
pod 'Digger'
Carthage
Add to your Cartfile:
github "cornerAnt/Digger"
Usage
Basic:
Download a file in the Digger directory under the sandbox's Caches
let url = "http://example.com/digger.mp4"
Digger.download(url)
Choose different callbacks depending on your needs
Digger.download(url)
.progress(nil)
.speed(nil)
.completion(nil)
let url = "http://example.com/digger.mp4"
Digger.download(url)
.progress({ (progresss) in
print(progresss.fractionCompleted)
})
.speed({ (speed) in
print(speed)
})
.completion { (result) in
switch result {
case .success(let url):
print(url)
case .failure(let error):
print(error)
}
}
}
Config yourself
/// Start the task at once,default is true
DiggerManager.shared.startDownloadImmediately = false
/// maxConcurrentTasksCount,deault is 3
DiggerManager.shared.maxConcurrentTasksCount = 4
/// request timeout,deault is 100
DiggerManager.shared.timeout = 150
/// allowsCellularAccess,deault is true
DiggerManager.shared.allowsCellularAccess = false
/// loglevel,deault is high
/*
***************DiggerLog****************
file : ExampleController.swift
method : viewDidLoad()
line : [31]:
info : digger log
*/
// If you want to close,set the level to be .none
DiggerManager.shared.logLevel = .none
// MARK:- DiggerCache
/// In the sandbox cactes directory, custom your cache directory
DiggerCache.cachesDirectory = "Directory"
/// Delete all downloaded files
DiggerCache.cleanDownloadFiles()
/// Delete all temporary download files
DiggerCache.cleanDownloadTempFiles()
/// Get the system's available memory size
_ = DiggerCache.systemFreeSize()
/// Get the size of the downloaded file
_ = DiggerCache.downloadedFilesSize()
/// Get the path to all downloaded files
_ = DiggerCache.pathsOfDownloadedfiles
}
Contributing
- Fork
- Commit changes to a branch in your fork
- Push your code and make a pull request
License
Digger is Copyright (c) 2017 cornerAnt and released as open source under the attached [MIT License](LICENSE).
*Note that all licence references and agreements mentioned in the Digger README section above
are relevant to that project's source code only.