Post

Replies

Boosts

Views

Activity

A strange problem of XCode, guess it's a bug
Hey, I write a simple console c++ program on XCODE fro mac. The code is very simple #include <iostream> using namespace std; int main() { int a = 0; cin >> a; return 0; } Then, 1: Press command + R to debug the program. 2: The program is waiting for user input, don't input. 3: Put a breakpoint at "return 0;" 4: The program will continuing running and hit the breakpoint which was put in step.3 without input anything. As I didn't input anything besides put a breakpoint, the "cin >> a;" should still block the program and waiting for user input. So the actual behavior is not expected. Have any idea? Thanks
2
0
402
Oct ’23
Is "NSURLSessionDownloadTask" able to retry?
Hey, Our "NSURLSessionDownloadTask" could fail under some circumstances. If our app is in foreground, then (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(nullable NSError *)error will be called, we have an opportunity to retry manually. But, if the app is in backend, we're not able to receive the callback until user set it to foreground. Whether it's possible to retry immediately when the task fails even app is in backend? e.g. 1: Not sure we're able to set "NSURLSessionDownloadTask" automatically retry when it fails 2: Are we able to receive the failure callback immediately ( delay a couple of seconds/minutes are also acceptable ) even the app is in backend, and retry manually? Thanks
1
0
596
Jan ’23