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

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -