Notify user that download is complete in Newsstand app
-
07-07-2021 - |
Domanda
Is there any way to use local notifications to alert a user that a magazine that they are downloading via newsstand in the background has completed downloading?
Soluzione
Usually, you are using an NKAssetDownload to get the newstand content. Then you start the download with a NSURLConnectionDownloadDelegate:
[assetDownload downloadWithDelegate:self];
When the download completes succesfully, you get a callback on
- (void)connectionDidFinishDownloading:(NSURLConnection *)connection destinationURL:(NSURL *)destinationURL;
in which implementation you could use a UILocalNotification to alert the user.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow