iOS NSURLSession background upload completes with error if device locked -


i'm attempting upload large files reliably possible. i've chosen nsurlsession using nsurlsessionconfiguration.backgroundsessionconfigurationwithidentifier configuration , create , resume upload task. works great except if user locks screen while file being uploaded.

originally, upload stop in 10 secs nsposixerrordomain error code 1: "operation not permitted". after researching issue here, set file's nsfileprotectionkey nsfileprotectioncompleteunlessopen.

after fix, entire file uploaded. i've confirmed looking @ file on server. still same error upon completion.

i've confirmed not occur if device not have passcode set, think still has file encryption/data protection. i've tried setting file's nsfileprotectionkey nsfileprotectionnone, still same error once upload finishes.

i have no idea system attempting triggers error. there application file system needs write once upload completes? have idea might triggering "operation not permitted" error once background upload completes, before of application code executed in didcompletewitherror?


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -