Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

It seems like asyncCompletionHandler is executed before download task is done #125

Open
marsha97 opened this issue Jan 10, 2020 · 1 comment

Comments

@marsha97
Copy link

i tried this

Just.get(url, params: params, headers: headers) { response in
       if response.status.code == 200 {
              let json = JSON(response.json!) 
              .......
      }
}

we managed, to log the content.
response.json returns nil because it is not in full response.
sample:

{
    order: {
         'id':  1,
         'notes': ''
    }

swift 5
xcode 11.2.1
we can't reproduce this. Only happens in production
Thanks

@marsha97
Copy link
Author

marsha97 commented Feb 6, 2020

well, it is probably so. it is not occuring in past XCode, but it become so frequent in XCode 11.2.1. I think asyncCompletionHandler is really meant to be executed this way, judging from the name. I will try to look for another way

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant