Questions tagged [nsprogress]

NSProgress is an API for tracking progress introduced in OS X 10.9 and iOS 7.1.

See the NSProgress Class Reference for details. There are also useful notes on NSProgress in the Foundation Release Notes.

31 questions
11
votes
1 answer

Using NSProgress to find download speed and time remaining

According to the documentation for NSProgress I see that -[NSProgress localizedAdditionalDescription] can report download speed and time remaining, e.g.: 1.61 GB of 3.22 GB (2 KB/sec) — 2 minutes remaining However, I'm not able to get those…
Eric
  • 16,003
  • 15
  • 87
  • 139
9
votes
2 answers

NSProgress strange behaviour

I have one big task that consist of several subtasks. and I want to add progress reporting for that big task. for that I want to use NSProgress, and according to the class documentation I can do this kind of subtask progress by using its child -…
Eyal
  • 10,777
  • 18
  • 78
  • 130
8
votes
1 answer

Using NSProgress with nested NSOperations

I've been investigating NSProgress but have found the existing documentation, class reference and tutorials to be lacking. I'm mainly wondering if my NSProgress is applicable to my use case. The class reference documentation alternatively refers to…
7
votes
2 answers

Is it possible to dynamically extend an NSProgress hierarchy after progress has started?

Say I have some hierarchy of NSProgress objects. For simplicity say a root progress with 2 children. If progress has already started can I add another child progress to the hierarchy and expect the right thing to happen? For example, say I start…
exokernel
  • 276
  • 1
  • 5
4
votes
1 answer

Why is Progress.fractionCompleted exceeding 1.0?

I noticed that under certain circumstances Progress.fractionCompleted exceeds 1.0 or even resets back to 0. I first noticed it while using the MultipeerConnectivity framework, where I built a progress tree with Progress instances returned from…
bcause
  • 1,303
  • 12
  • 29
4
votes
2 answers

NSProgress crash on creating with KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECTS_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED

I use NSProgress to notify about progress of a complicated task (the task consist of many subtasks, that can consist of other subtasks). I create main progress in startTask method: - (void)_startTask { _progress = [NSProgress…
Andrew Romanov
  • 4,774
  • 3
  • 25
  • 40
4
votes
0 answers

Canceling an NSAsynchronousFetch

From what I've been reading about the largely undocumented NSAsynchronousFetchRequest, it is supposed to be cancelable. In Apple's video "What's New in Core Data" from WWDC 2014, there is an example of it being done (right around 17:40). But nowhere…
dudeman
  • 1,106
  • 8
  • 19
4
votes
1 answer

uploadTask with progress using AFNetworking in Swift

I'm trying to use NSProgress with AFNetworking, this is the code I'm using //func upload... //... let request: NSMutableURLRequest = AFHTTPRequestSerializer().multipartFormRequestWithMethod("POST", URLString: url, parameters: s3parameters,…
pJes2
  • 623
  • 1
  • 8
  • 13
3
votes
0 answers

AFNetworking with UIWebView issue

When I worked with AFNetworking before I used this method webviewMain.loadRequest(request, MIMEType: mimeType, textEncodingName: textEncoding, progress: { [weak self] (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) -> Void in …
Paul T.
  • 4,938
  • 7
  • 45
  • 93
3
votes
2 answers

How do I update a progress bar using NSProgress using Cocoa Bindings?

I've been trying to use the new NSProgress class to report the progress of an operation in my Mac app. Right now, it's saved as a property in my App Delegate (and is updated from a different class and a different queue), and seems to be updated…
Ben
  • 305
  • 4
  • 13
2
votes
4 answers

How to aggregate multiple child Progress into one master Progress in Swift

I'm trying to download multiple files simultaneously using NSURLSession in Swift. I want to merge all the download progress status into one as to show 100% when all the files are downloaded. Currently I get 100% for each file download completion,…
Nuibb
  • 1,800
  • 2
  • 22
  • 36
2
votes
1 answer

How to update the NSProgressIndicator?

I have problem with NSProgress. The problem is that NSProgressIndicator is not updating during the process and showing only a small completed portion at the end of process. The localizedDescription is also showing only at the end of the process,…
VYT
  • 1,071
  • 19
  • 35
2
votes
1 answer

Massive memory growth with NSProgress

I am experimenting with NSProgress, and finding a simple loop on a background thread causes memory to grow rapidly: class Worker { var progress:NSProgress? func doWork() { let numIterations:Int64 = 100000 let delay:UInt32 =…
Jon Brooks
  • 2,472
  • 24
  • 32
2
votes
1 answer

Adding child progress for multiple file download

I'm downloading multiple files using AFNetworking 3.0 in my project. I want to show single download progress of all files. I added each child progress of each file download to the parent progress. But it's not working, app crashed. I'm getting the…
Nuibb
  • 1,800
  • 2
  • 22
  • 36
2
votes
1 answer

How to track two NSProgress in parallel?

I have two different big tasks with several subtasks each. Each subtask has a child NSProgress which I update manually. Each big task hosts a parent NSProgress with several [progress becomeCurrentWithPendingUnitCount:1.0] // Perform subtask which…
Ricardo Sanchez-Saez
  • 9,466
  • 8
  • 53
  • 92
1
2 3