shapedbyiris / download-manager

Swift download manager that can initiate, cancel, resume and persist downloads as well as download files in background for iOS
MIT License
15 stars 2 forks source link

Unable to ReConfig the Downloader #1

Open amirsaam opened 1 year ago

amirsaam commented 1 year ago

Howdy, Thanks for your handy package!

While we want to start using it in PlayCover, and I have already done it but there was an issue that me personally cannot use the instructions to reconfig the downloader. Using same name for struct causes this

Cannot assign value of type 'PlayCover.DownloadManagerConfig' to type 'DownloadManager.DownloadManagerConfig'

and changing the name of the struct this:

Cannot assign value of type 'DownloaderConfig' to type 'DownloadManagerConfig'

I am declaring like this:

let downloader = DownloadManager.shared
someFunc() {
    downloader.configuration = DownloaderConfig()
}

Can you help on this? For sure I am missing something.

Regards,

amirsaam commented 1 year ago

Hello? Anyone here? :D

MartinP7r commented 1 year ago

@amirsaam from what you write it sounds like you are defining your own DownloadManagerConfig struct. Don't do that, use the one given by DownloadManager.
If you're still unsure what this means, please share more of the source code where you are setting the configuration.