I want's to upload big file(video) from my application while application is in Background mode. I am using AFNetworking Library. Application is running from 3 min but after that it kill all the activity.
Below code i use in application.
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
AFHTTPRequestOperation *operation = [manager HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *operation, id responseObject) {} failure:^(AFHTTPRequestOperation *operation, NSError *error) {}];
[operation setUploadProgressBlock:^(NSUInteger __unused bytesWritten,
long long totalBytesWritten,
long long totalBytesExpectedToWrite) {}];
[operation setShouldExecuteAsBackgroundTaskWithExpirationHandler:^{}];
[manager.operationQueue addOperation:operation];