Skip to content

Commit

Permalink
Test app: enable background fetch and print error
Browse files Browse the repository at this point in the history
  • Loading branch information
noamtamim committed Nov 26, 2019
1 parent 5fc4259 commit b361124
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Example/DownloadToGo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
6 changes: 5 additions & 1 deletion Example/DownloadToGo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,11 @@ class ViewController: UIViewController {

lam.renewDownloadedAsset(location: url, mediaSource: source) { (error) in
DispatchQueue.main.async {
self.toast("Renew complete")
if let e = error {
self.toast("Failed with \(e)")
} else {
self.toast("Renew complete")
}
}
}

Expand Down

0 comments on commit b361124

Please sign in to comment.