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*

6
  • 3
    Does the API allow you to instantiate more than one instance of apiObj at a time, or does all of your code have to share the one instance? Commented Apr 26, 2019 at 22:57
  • "Imagine if someone else calls doWork for that same object right after you do. They "steal" the delegate, and they will get both workDone callbacks" - if 2 request be started in parallel by same wrapper, and call the callback twice as they complete, is there a way to recognize from inside the callback to which request it relates? Commented Apr 27, 2019 at 5:11
  • what language is this? many have existing constructs like promises which do this kind of thing Commented Apr 27, 2019 at 6:26
  • 1
    helpful? learnappmaking.com/promises-swift-how-to Commented Apr 27, 2019 at 6:28
  • @JohnWu the API creates the objects internally and gives them to you. There's no way to request a distinct object to avoid the delegate issue Commented Apr 28, 2019 at 20:30