测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布最新版本 | 2017年4月 |
由Kanstantsin Bucha,Kanstantsin Bucha维护。
[](https://travis-ci.org/Kanstantsin Bucha/CDBDownloader)
要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install
[CDBDownloader downloadFileAtURL:URL
progress:nil
completion:^(NSURL * downloadedFileURL, NSError *error) {
if (error != nil) {
[[NSFileManager new] removeItemAtURL:downloadedFileURL
error:nil];
return;
}
NSLog(@" Download document to URL:\
\r\n %@", downloadedFileURL);
}];
请记得在您的 info.plist 文件中添加部分,将 www.pdf995.com 替换为您的下载域名
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>www.pdf995.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
CDBDownloader 可以通过 CocoaPods 安装。要安装它,只需在 Podfile 中添加以下行
pod "CDBDownloader"
Kanstantsin Bucha,[email protected]
CDBDownloader 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。