Open LetsSee opened 6 years ago
Hi @LetsSee!
It seems I can't think of a good use case when you would need the NSURLSessionDataTask
objects, which are managed by the SaltEdge iOS SDK classes. Can you provide further details on why would you need control over the requests?
Thanks
Of course:
user initiate some API call on low speed network - loading hud appears - it takes too long and user wants to cancel this operation
consider some long background task - we want to get state in some point (loading, finished, canceling, suspended)
....
I see your point, but there are some constraints that will impede this from happening (currently).
The good thing is that you don't actually need the underlying session task objects to solve the two issues you described. The only drawback is that you won't be able to cancel the network operation, and I agree that it's a pity. We will surely consider your feedback when we'll implement a major update, and I'm leaving this issue open until that moment.
Thanks, @nemesis!
Please take into account those two issues are just examples, i can imagine much more cases.
Hi!
It would be great if API calls will return NSURLSessionDataTask or array of tasks to give users possibility to control network calls. E.g:
- (void)fetchFullProvidersListWithSuccess:(void (^)(NSSet* providers))success failure:(SEAPIRequestFailureBlock)failure
will be
- (NSArray*)fetchFullProvidersListWithSuccess:(void (^)(NSSet* providers))success failure:(SEAPIRequestFailureBlock)failure