Posts

Showing posts with the label JSON

Angela Yu Xcode 12 Course - Part 18 (lectures 175 to 184)

So this time we're by the pool by RAK! Probably better in terms of wind, sand etc... I've arranged for someone to collect my laptop to replace the screen. Have also ordered a new case and an ant-glare screen cover. All of these things should help and it's worth the money. Well it's a lot of it! 1575 to repair; 200 for anti-glare screen; 50 for cover. Anyway.... Today I'm going to start the Bitcoin tracker challenge. Going to spend an hour on it - maybe more. Let's go! Start Time - 10:27 OK, step 1 is to download the project.. STEP 1 Right, I am not going to type much here as it is pretty much following instructions. Will add anything that's a useful learning point! OK, after putting in the currencyPicker.delegate = self (and the same for the dataSource one), errors come up because we HAVE NOT CONFORMED TO THAT PROTOCOL! That makes sense - we've put in those protocols in the view controller. So those methods need implementing. Ok. Using the...

Angela Yu Xcode 12 Course - Part 13 (lectures 157 to 163)

Image
How unusual, an entry on Tuesday afternoon?! Well, mercifully, there is time off work in Dubai due to the Pope's visit! Not that I am seeing the man himself but thank you! Yesterday was also off but no chance to code. So today I have a good hour or so to get some done. My aim is to totally finish the 'Clima' app, then I will have surpassed my progress from last time. It's been a good month or so with Angela and I am 100% happy with that. Loads of useful things picked up along the way, whether the content is new or I had just forgotten bits. Either way, well worth it. The other good news is that I feel NO inclination to switch courses whatsoever. No, I want to stick with this one from Angela until the very end. Then I will review where I am and what the next course of action is. Anyway, let's go! Start Time - 14:04 Asynchronous method - this means it works in the BACKGROUND as a method. If it were in the foreground, it means that it would freeze up the entire app...

Angela Yu Course Part 16 (lessons 154 to 156)

Yes! We're continuing with Angela's Course! Lots of new concepts we're being introduced to via APIs but all good stuff. Useful in the future - lots of possibilities in terms of accessing data from websites.  JSON and how to Parse it let weatherJSON : JSON = response. result .value The issue here is that we need to force unwrap the value here. So Swift has given this automatic correction: let weatherJSON : JSON = response. result . value as ! JSON Angela's correction though is this -  let  weatherJSON :  JSON  = JSON(response. result . value!) OK so the build is succeeding but the 'location unavailable' keeps coming up on the main screen. No idea why.  OK I can't do the next bit - copy the output in the console into the JSON website as I only have error output. That's a shame! The JSON data shows it in key value pairs - like a dictionary. The JSON editor online makes it into a more human readable format! Remembe...