Post

Replies

Boosts

Views

Activity

Reply to The app will crash on IOS 18 when send a network request
Me too. The same goes for error messages; NSString *strurl = @"https://example.com"; NSURLSession *session = [NSURLSession sharedSession]; NSURL *url = [NSURL URLWithString:strurl]; NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:url]; NSURLSessionDataTask *dataTask = [session dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { if (error) { NSLog(@"Error: %@", error.localizedDescription); } else { NSLog(@"Data received: %@", data); } }]; [dataTask resume]; log: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager createDirectoryAtURL:withIntermediateDirectories:attributes:error:]: URL is nil' *** First throw call stack: (0x193f5108c 0x1912532e4 0x192c19f48 0x1953c32bc 0x1953c2c7c 0x10891271c 0x108923f04 0x1953c2a88 0x1953c1b20 0x1953c15f4 0x1953c107c 0x1953bb4b0 0x19546c2c4 0x19546c214 0x19546b30c 0x108910a30 0x10891271c 0x10891a5e8 0x10891b394 0x10891cb20 0x1089285f0 0x108927c00 0x21b2b3c7c 0x21b2b0488) libc++abi: terminating due to uncaught exception of type NSException
Sep ’24