简体   繁体   中英

Downloading files using NSURLSessions is happening only when iPhone is Charging

I am using NSURLSession to download the video files from server. I am using the following library ObjectiveCDM . Download is working seamlessly when my device is connected to charging but when I am trying to download when my device not charging then download stopped. The above library is written using NSURLSession. Is the any way to override this property.

Yes, you can override this, assuming that the download isn't being initiated while your app is in the background. See the discretionary property on NSURLSessionConfiguration .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM