title: Swift & PromiseKit: Resolving ALL promises from a loop
body: <p>I'm looking for a solution in Swift3 to resolve a dynamic number of promises all at once, e.g. like this sample in JavaScript:</p>
  
  <pre><code>var promises = [];
  for(var i = 0; i &lt; 5; i++) {
      var promise = $http.get('/data' + i);
      promises.push(promise);
  }
  $q.all(promises).then(doSomethingAfterAllRequests);
  </code></pre>
  
  <p><a href="https://daveceddia.com/waiting-for-promises-in-a-loop/" rel="noreferrer">https://daveceddia.com/waiting-for-promises-in-a-loop/</a></p>
  
  <p>There was a library call 'Craft' for Swift2 that could do that (<a href="https://github.com/supertommy/craft" rel="noreferrer">https://github.com/supertommy/craft</a>), but it's no longer maintained.</p>
  
  <p>Does anyone know if or how I could do that with PromiseKit or another library?</p>
  
  <p>Thx a bunch!</p>