Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Thanks so much for the awesome explaination. yes you are right, i dont need an async sequence for the photo. I would just need to fetch it asynchronously and may be instead of waiting for all array of images, just return them one by one. I wanted to try the new for await syntax, but the usecase is wrong. thanks. Commented Jun 30, 2021 at 14:40
  • i still get errors with this answer: "Type 'AsyncPhotoSequence' does not conform to protocol 'AsyncSequence" and "Reference to generic type 'IndexingIterator' requires arguments in <...>" Commented Jul 2, 2021 at 11:16
  • @AshishPisey Haha 😅 The truth is, I don't actually have Xcode Beta to compile the code, so I expected there to be some silly mistakes, like forgetting to add the generic type parameter for IndexIterator. It seems like I also need the Element type alias in AsyncPhotoSequence. Does it work now? Commented Jul 2, 2021 at 11:25
  • yes @Sweeper it works now. Thanks a ton. i will post the link to github project with possible different solutions i tried here in comments. Commented Jul 2, 2021 at 11:52