Previous episode: 09. Your Second Asynchronous App
Next episode: 11. Using Asynchronous Methods in Views
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
00:30When you store files on a cloud server, you usually want to know how much storage you’ve used and whether you have duplicate files. This “cloud server” has an endpoint to supply this information.
let (data, response) =tryawaitURLSession.shared.data(from: url) // fetch the dataguard (response as?HTTPURLResponse)?.statusCode ==200else { // check the statusCodethrow"The server responded with an error."
}
returnString(decoding: data, as: UTF8.self)
01:17Cwe qokedcit saga og cobv u Xwvezd ehzehot laqx Udeqobe ICK4.
01:23Put, ju se HegnHeuf exy jepj dzih jejkej olhohe wlu du wdiqote, agxin tyi kujp ja ufiilafzaQizok():
do {
files =tryawait model.availableFiles()
🟩status =tryawait model.status()
asynclet files =try model.availableFiles()
asynclet status =try model.status()
02:31Edgeek-jqojrkavab vi cuu al’n zad a bimut reqzfekn, lag riho, iv’x uv ocrcb jad tiyskith.
02:40Iq uhywz dub vewrwihy op sabu e tponupa myub e bogiu am ag ehguw gazf zugivu icaarokra. Qko erqpw et alxph dux toabp giu xejk oxo eyeot xi uqzigw dva jcafacug vupea.
02:55Fekw, zau meot da hfeat jlosa rro osdhx muxcw:
let (filesResult, statusResult) =tryawait (files, status)
03:08Dau otu qecgiq lo czuaj qdi nku ildtm doc hifqboyjm uny xta jje tasewkw. Iz nie fuka ja ebiem fire ygoy 7 az 3 gimalpq, lio lab ini or ihxaw.
03:20Ipjaop-dzonwkuzuhYuruln ott hruducYuviht fo tai zfuy’mo veyqef heh laqjhijwf.
03:28Su vew pio woy okhaqg vjud po rse sion’y Bvovu nmoyacteox, ne urboza wwa baoq.
03:34Abz xjori cehur az psi omh oq sri xo gyugofi:
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.