Closed hyhajnal closed 5 years ago
I'm not sure, I'm guessing the delegate is going away somehow.
@ccgus I'm guessing the delegate maybe causes a memory leak or other problems which leads to sketch crashed. Thanks for your replay, I will try another way
did you solve the problem?
@hyhajnal 请问最后解决办法有吗?我也正在寻求实现上传进度的方法
I want to get the progress when upload a zip file, so I use NSURLSessionUploadTask delegate
URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:
the file uploaded successfully, but it causes sketch exit and the log shows "Sketch XPC connection invalidated".
while other delegate like
connection:didReceiveResponse:
works well, here is my code: