Skip to main content
Best practices
1 vote
1 replies
81 views

I have the following code. func myFunction() -> Promise<MyResult> { firstly { doSomeJob() }.then { jobResult in handleJobResult(jobResult) }.then { handledResult ...
Nick's user avatar
  • 3,533
1 vote
0 answers
273 views

I am fetching a list of items using Alamofire and Promisekit. Some items take longer to get than others. I have set the timeout in alamoFireManager to 180 seconds, however 60 seconds after the first ...
KvnH's user avatar
  • 506
2 votes
2 answers
275 views

I have a Promise chain like this firstly { Network.shared.getInfo() } .then { info in Network.shared.getUserDetail(info) } .then { detail in Network.shared.getAddOn(detail) } .done { addOn in ...
Fry's user avatar
  • 6,305
1 vote
1 answer
606 views

Now I am migrating from PromiseKit to Concurrency. As I understood, I should replace Promise and Guarantee with Task. However, I cannot find a replacement for Promise<T>.pending(). Is there ...
Roman Podymov's user avatar
3 votes
1 answer
1k views

With the PromiseKit library, it’s possible to create a promise and a resolver function together and store them on an instance of a class: class ExampleClass { // Promise and resolver for the top ...
bdesham's user avatar
  • 16.3k
7 votes
1 answer
4k views

I'm new to Swift, coming from JS, and I've started to build an iOS app. Initially I went down the road, using Promise Kit for the async stuff, as it seemed easier to me than other things I read about. ...
Kim's user avatar
  • 966
1 vote
5 answers
6k views

I'm coming from JS and learning Swift to build an iOS native version of an app. In JS, I use the following pattern all the time: ... async function doAyncFunction(item) { try { // do async call ...
Kim's user avatar
  • 966
1 vote
1 answer
1k views

Might I be so inclined to ask for a hand and or different perspectives on how to Unit Test a function on my Viewcontroller that calls an HTTP request to a Back End server using promise kit which ...
patrick sebastian's user avatar
0 votes
1 answer
811 views

I've spent the better part of the day banging my head against the wall over this, and I think I finally understand it. Here's the question I wish had existed this morning when I started looking. For ...
TallChuck's user avatar
  • 2,035
0 votes
1 answer
907 views

I'm using PromiseKit in my project and I need to do batch/multiple calls to the API and wait for all responses. Any ideas how to do this? I'm pretty new to PromiseKit, and didn't find anything ...
Mihai Fischer's user avatar
-1 votes
1 answer
2k views

I have a function like this func fetchPokemons() -> [Pokemon] { var pokemons : [Pokemon] = [] service.fetchPokemons().done{ (newPokemons) in pokemons += newPokemons.pokemons! ...
Ivanius's user avatar
  • 109
0 votes
1 answer
187 views

I am trying to chain some API calls and I think I am confusing some concepts. Would love some clarification & code samples. I have implemented these functions... func promiseFetchPayments(for ...
Adam Dahan's user avatar
1 vote
1 answer
352 views

I write function 'asPromise()' but dispose is weird, I don't better idea. so If you have any better ideas, please let me know thank you
ocean's user avatar
  • 13
1 vote
1 answer
153 views

I'm trying to get data from the network request using PromiseKit in the following code below, but on the line seal.fulfill(data) I'm getting the error 'Cannot invoke 'fulfill' with an argument list of ...
Andrey's user avatar
  • 25
-1 votes
1 answer
2k views

I am trying to decode a json data, but it throws an error: [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed responseSerializationFailed(reason: Alamofire.AFError....
O_S's user avatar
  • 24

15 30 50 per page
1
2 3 4 5
16