Swift Bite-sized Best Practices is a series of quick reads showing you how to write clean, maintainable, testable, readable Swift code. Read a minute now, save an hour later.
Most apps use a custom color palette of specific shades not found among the built-in UIColor constants.
The best way to store these custom color constants for your app is in an extension on UIColor. For example, let’s say you want to use the following three custom colors in your app:
Swift extensions allow you to add computed properties to existing types. You can take advantage of this feature by…
So you’re fighting the good fight for performant, clean, optimal Swift code, and as a result you’re keeping a weather eye out for sneaky strong reference cycles and the memory leaks they cause. And, as it happens, you have found yourself in a situation that calls for adding a stored property to a class which needs other class members in its computation. This property, however, will not be required immediately and needs some non-trivial amount of time to initialize. Of course, you like to use lazy properties where appropriate for the efficiency improvements they can provide, but you are now…
So you have your widget up and running, and you’re ready to provide some cool new functionality for your users using the latest iOS features. But how do you connect your widget with your app, so the widget can get at all the nicely modeled object data your app creates?
That’s what we’re here to make happen! Your main application can store object data by taking advantage of the Codable protocol, and you can give your widget and app shared access to this stored data by adding them to the same App Group. Let’s get started.
First, we need to…
When it’s time to show off the app you’ve worked hard to build, it’s important that your demo materials are as clear and polished as possible. That’s where touch indicators come in, allowing users to easily follow app interactions in screen recordings like this one:
If you have visited App Store Connect recently, whether to publish a new app or to push an update, you may have noticed a new addition to the App section navigation options…
I am a firm believer in the benefits of monitoring Alexa skill metrics — beyond the important warnings they can give you when something has gone wrong in the wild, it can also be pretty enjoyable to watch good metrics climb! In this tutorial, we will learn how to schedule a Lambda to get your skill metrics via the Alexa Skill Management API (SMAPI) and deliver those metrics to your inbox, all managed using Serverless Framework.
SMAPI is an API that gives you all the same functionality found in the ASK CLI or the Alexa developer console. The SMAPI Node.js…
Serverless Framework gives you the ability to create a Cognito User Pool, fully configure it, and add custom lambda triggers to it, all in one deployment step.
Let’s start by setting up a simple Cognito User Pool in the Resources section of our Serverless stack:
Serverless allows you to use CloudFormation templates in the Resources section of your stack, so I have all the control provided by CloudFormation in my Cognito pool configuration. Here, I have created a new pool named mikes-example-pool
, specified that I want users to use email addresses to sign up for the pool by setting…
**Update 12/31/2020: This has come to the fore in recent weeks as a result of President Trump’s demands for CDA 230 changes as part of the latest stimulus bill. Enjoy this refresher on the possible ramifications!
This past week Tuesday (10/13), the Supreme Court issued a denial of a petition for a writ of certiorari in the case of Malwarebytes v. Enigma.
In simpler terms, it means that four Justices did not agree to review the case, so the ruling of the 9th Circuit Court was left to stand. While it may seem like a case that the Supreme Court…
Congratulations! You have made it one full year into your journey of serverless bliss with your current AWS account. And, never ones to forget an important occasion, AWS sent you a nice email with this friendly subject line: Your AWS Free Tier Period is Expiring.
So, what does that mean for you and your AWS bill? Have you been the victim of a cruel trick, duped into dependency on AWS products using the classic free trial scheme? …
Software developer. Mobile, serverless, voice. Knows some things, curious about all things.