Post

Replies

Boosts

Views

Activity

Cannot use URLSession in a Swift Package
I created an executable Swift package and when I do a simple HTTP request such as: func request() {     let url = URL(string: "https://httpbin.org/get")!     let task = URLSession.shared.dataTask(with: url) { (data, response, error) in print("Test") // Never executed         if let error = error {             print("error: \(error)")         } else {             if let response = response as? HTTPURLResponse {                 print("statusCode: \(response.statusCode)")             }             if let data = data, let dataString = String(data: data, encoding: .utf8) {                 print("data: \(dataString)")             }         }     }     task.resume() } request() It simply does not execute the code inside of dataTask.
1
0
1.1k
Jun ’21
Not enough space alert when trying to install macOS beta
Hi! I want to upgrade my Mac to macOS Big Sur. I downloaded the profile, installed it, looked for the update, and got the "Install macOS Beta" app. Unfortunately, after agreeing to the license, I had the "not enough space alert". I cleaned my Mac, but the disk space alert did not update: it tells me that I have 31.19GB available while I have 60GB available (checked using  -> About This Mac -> Storage). How could I upgrade my Mac? Thank you!
2
0
1.4k
Jun ’20