Any clue why am I getting error "'URLSession' produces '()', not the expected contextual result type 'URLSession'" for the below line -
internalSession = URLSession(configuration: URLSessionConfiguration.default)
I'm using latest Xcode and swift 3. I have found similar questions & answers on stackoverflow and tried them but they didn't have working/accepted answers.
Please help.
请检查您的 URLSessionTaskDelegate 或 URLSessionDelegate 的委托方法,并尝试按照 swift 3 进行匹配。这对我有用。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.