When you want a property to be saved and loaded from the persistent storage called UserDefaults
, you can declare it like this:
@AppStorage(“MyKey”) var savedValue
When the app launches, the key is used to retrieve the value. If there is a value, savedValue
will have that value. When you change savedValue
, UserDefaults
is updated automatically. If you’re displaying the value anywhere in your SwiftUI (e.g. in a Text
), the value is updated there too. …
Face ID, which was introduced with the iPhone X in 2017, solved a major security flaw in fingerprint readers.
As we use smartphone touchscreens without a stylus, our phones get covered in an exact copy of our fingerprints. The iPhone 5S, the first iPhone to use Touch ID, was hacked by scanning fingerprints from the screen within days of its release. A bad actor that has access to your phone has no idea what your face looks like, and there is no way to access the phone without a high resolution 3D scan of your face. Face ID does not just recognise your face as an image, it recognises the actual shape, including the unique combination of distances between your facial features. …
Parler CEO John Matze has a peculiar take on what has just happened:
Apple will be banning Parler until we give up free speech, institute broad and invasive polices like twitter and Facebook and we become a surveillance platform by pursing guilt of those who use Parler before innocence.
It sounds like he refuses to make an app that could possibly abide by the rules of the app stores.
So what’s going to happen?
Between now and the passing of social media laws by the incoming Biden adminstration, we’re going to have a lot of chaos. The Parler app still works for every phone that has it installed, and the app was the top download on the App Store during the 24 hours Apple gave Parler to completely overhaul its app. …
I heard a rumor that Donald Trump was moving from Twitter to Parler after his account was banned. I wanted to see for myself, as I had already created an account on Parler for periodically watching the downfall of a nation.
What does CEO John Matze think of what’s unfolded this week?
Well, you know I don’t necessarily monitor a lot of this stuff. I participate and watch Parler just as anybody else does. If people are breaking the law, violating our terms of service, or doing anything illegal, we would definitely get involved. …
We’re going to make a custom version of TextField
that can control whether the keyboard is active. In other words, we’re going to control what the first responder is. First, we need a Coordinator
class that will be helpful in responding to events related to UITextView
. Since structures can only conform to protocols and cannot inherit from classes, we are using a class for this:
Now, I have a tendency to use extensions of the provided system types that give me convenience initialisers that simplify their creation.
I’m also including a function for conditionally setting the first responder, as UITextField
uses void methods for both of these and can’t just be sent a boolean value as a…
As far back as 2012 there was evidence that some people in Indonesia who were accessing Facebook on mobile devices thought that they were not internet users. They never used any website, but they used the Facebook app. In other words, they saw the web as an open system that could contain anything, but the walled garden of Facebook was entirely separate.
As Wired put it at the time, “Facebook is on the cusp of becoming a medium unto itself — more akin to television as a whole than a single network, and more like the entire web than just one online destination.” The internet.org website that Facebook used to introduce the web to entirely new markets still exists, but many countries pushed back on the idea of a company convincing the world that its closed system is the internet. …
I recently hit a wall on the road to professional and academic success.
The roadblock was my own lack of ability to grasp the latest topic in my Computer Science degree. I didn’t lack motivation or enthusiasm for the subject, as I’ve been making my own iOS apps since before I decided to get a degree. Instead of playing to my strengths, I was tasked with using C++ and DirectX to control computer graphics at the most basic level. …
This is a story about a business, but it is also about the stories we tell one another.
When our preferred stories can exist without being challenged, we can control the stories we tell ourselves.
There were fewer attempts to hack election infrastructure this year than there were in 2016 or the following mid-terms.
Perhaps the highly secure systems that protect voter data are a more difficult target than social media, which allows anyone to create an account with minimal effort. Passwords and other security measures do not have to be broken for a foreign adversary to gain access to these networks. …
There’s only one week to go before Apple’s One More Thing event on 10th November 2020, where we will undoubtedly see ARM Macs that take advantage of macOS Big Sur’s ability to run across different architectures.
One More Thing is a reference to a practice that started in 1999, where Steve Jobs would leave (often quite big) announcements to the end of a presentation.
Many thanks to Greg Wyatt with Apple Explained, who compiled a 52-minute video of all these announcements without which none of this would have been possible. I used the Macworld article Every ‘One more thing’ Apple has ever announced to confirm that there hasn’t been another one since the iPhone X in 2017. …
Apple’s product names are getting pretty confusing.
My first iPad was the original iPad Air, which was released in 2013. It’s hard to believe now but at the time this was the flagship of the iPad range. After numbering the first few, this iPad was considered to be so thin that it deserved the Air moniker, which had already been used for the MacBook Air. There was already a discrepancy from the beginning: the MacBook Air had not been like the MacBook Pro.
It wasn’t the best, but it was the thinnest.
Then came the iPad Air 2.
These were still the days when only the iPad mini was a different size from the main iPad Air product line. It seemed as if the Airs would go on for at least as long as the Air-less line that preceded it, and then came a surprise. In 2015 a 12.9-inch iPad was released, while the 11-inch MacBook Air was still in existence. The MacBook, a product whose name had been reintroduced that very year, was a mere 12 inches. …
About