This year, Apple introduced a new feature that gives users even more control over what photos may third party apps see when they see a Photo Picker. The system will first present an alert asking users if they want to give access to their photos at all, and they have the option to give access to all their photos, or only to the photos they choose.
This is great, but it has been a very confusing experience for both users and developers alike. In this article we will explore this new privacy-focused photo picker and how to make good use of it without compromising too much of either usability and privacy.
If you have been writing Swift for a while, you have undoubtedly used high order functions such as .map and filter. These higher order function work on any collection, and they are very useful when we want to quickly transform objects into something else, or when you want to do other operations in sequences that would otherwise take more than one line of code if you were to make them with loops.
Printing stuff to the console is a simple but powerful step we can take when debugging our apps. But there are times when we want to print an object and we actually get something entirely different, often also useless.
For example, this commonly happens when working with classes and printing instances of them.
KeyPath. It sounds like a very fancy word. And it is a feature you have likely used it, either knowingly or unknowingly. KeyPaths are one of my favorite features in Swift, but they can be a bit tricky to understand. In this article we will explore what KeyPaths are, and when you may want to use them.
Understanding KeyPaths
In simple words, a KeyPath is a reference to an actual property instead of a value.
There are times in which you may want to host small JSON (or other small types of files) somewhere because your app needs them. Maybe you want to configure feature flags, or maybe you want to host IAP identifiers somewhere so as to not hardcode them in your app. This last case is something I did recently.
The immediate thought will be get a cheap server somewhere - after all, using something like Vultr you can get cheap hosting for as low as $2.50 per month. But did you know Github allows you to publish static websites, and you can piggyback that on that to store remote “config” about your apps?
If you have been writing Swift in the past couple of years, you have probably been using Codable (which is really just the composition of Decodable and Encodable in the same protocol).
If you have been writing iOS apps for longer, you likely know about JSONSerialization as well, which is the backbone of Codable and it allows you to do more manual work when parsing JSON, seemingly giving you more control.
If you know JSONSerialization, you have probably found times in which Codable seemingly doesn’t give you the flexibility you need, and you may have been tempted to drop Codable in favor of JSONSerialization when parsing very specific or even corrupted JSON.
I had announced that I wouldn’t be able to write an article this week due to it being Elections Day in my country. that said I just can’t leave you guys without article, so this is a short one.
We will write another NSFormatter subclass. It will allow us to compose E-mails easily. This should also help show that formatters can format string into anything else really.
In short, we will be able to “compose” emails using raw strings, like this:
Anilist is the popular website for anime and manga fans, where you can keep track of your favorite series, or discover something new to watch or read.
Silvianna comes packed with power features for list management. The app allows you to modify anything about items on your list as long as it is supported by Anilist.
FEATURES:
Friendly on the smallest iPhone and the biggest iPad.
Keep track of series that are currently airing easily. Series that you haven’t watcheda all the episodes of and are currently airing will have a visible red banner telling you how many episodes behind you are, making it easy to keep track of everything you watch.
When you finish watching a series, you will automatically be prompted for the rating. You no longer need to navigate through different screens if you weren’t able to rate something you watched.
When rating a series, it will use the rating system currently set in your Anilist account. It doesn’t matter if you are using the standard 10 point system, 10 point decimal system, 5-star system, or even the Emoji system - Silvianna supports all the rating systems provided by Anilist.
If your rating system supports Advanced Scoring, Silvianna will grab your parameters and you will be able to also perform advanced scoring according to your custom parameters.
You have access to your Anilist profile, so you can access your Manga and Anime lists easily and quickly.
Multiwindow support on the iPad.
You can search the entire Anilist database for Anime and Manga.
This is just the initial release of Silvianna, and we are excited to make the project grow with your feedback and ideas.
NSFormatter is an abstract class. All formatter classes inherit from it. In Swift, everything we need about it is open, so we can create our own NSFormatters with ease.
Sometimes we may be interested on how well our app is performing out there in the world. After all, our apps may be running in different environments that are hard to test or that Instruments may not catch.
For this purpose, Apple introduced MetricKit back in WWDC2019. MetricKit allows us to aggregate and analyze this benchmark data on a per-device basis, and not only does it include information on performance and battery usage, but also on exceptions and crash reports.