Collect array of successful promises
问题 I'm using PromiseKit 3.0 in Swift and I have an array of promises [Promise<Int>] . I want to gather up all the promises that succeed into a single promise. Promise<[Int]> . Both when and join reject if even one contained promise rejects. According to the docs, I'm supposed to be able to use join and the error will contain an array of the fulfilled values, but in Swift the error contains all the promises that were passed in, not the fulfilled values. Any help would be appreciated. 回答1: I see