triniwiz / nativescript-downloader

Apache License 2.0
32 stars 18 forks source link

Background downloading on IOS #19

Open 7ammer opened 6 years ago

7ammer commented 6 years ago

Hello :) Can this module do background downloading for IOS? It looks like android can achieve this but I can't seem to get the same result on IOS. Cheers

Which platform(s) does your issue occur on?

IOS simulator's, not tried on a real device yet.

Please, provide the following version numbers that your issue occurs with:

CLI 4.0.0

"tns-android": {
  "version": "3.4.2"
},
"tns-ios": {
    "version": "3.4.1"
}
"tns-core-modules": "~3.4.1",
"nativescript-theme-core": "^1.0.4",
"nativescript-vue": "^1.3.1",
"tns-core-modules": "~3.4.1",
"nativescript-fonticon": "^1.1.1",
"nativescript-gradient": "^2.0.1",
"nativescript-localstorage": "^1.1.5",
"nativescript-social-share": "^1.5.0",
"nativescript-videoplayer": "^4.0.0",
"nativescript-webview-interface": "^1.4.2",
"nativescript-audio": "^4.3.5",
"nativescript-animated-circle": "^1.1.0",
"nativescript-downloader": "^2.0.0"
shivgolani commented 6 years ago

@7ammer @triniwiz Background Downloading for IOS is not working. Any alternatives?

nicHoch commented 6 years ago

background download on IOS would be nice!

triniwiz commented 6 years ago

I'll look into it

7ammer commented 5 years ago

Hello @triniwiz 👋

Thanks for this package and your time. I was just wondering if you had any further thoughts on this.

Many Thanks

7ammer commented 4 years ago

Hello After messing around with NSURLSession for a while it seems that this issue maybe due to this package's use of NSURLSessionConfiguration.defaultSessionConfiguration instead of NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier.

I see that you've actually written it but commented it out in the code: https://github.com/triniwiz/nativescript-downloader/blob/0b5b005400c57b50074df0f7740bdcfdd60a6d0e/src/downloader.ios.ts#L31. I was wondering what the cause was for commenting it out and if we could apply it again?

Many thanks

7ammer commented 4 years ago

Hello 👋

It looks like updating AFNetworking to '4.0' resolves this issue!

See my pull request: https://github.com/triniwiz/nativescript-downloader/pull/45