If case, fallthrough, equatable, and enums in Swift

If case, guard case, fallthrough, and the CaseIteratable protocol. These are all terms which could sound familiar if you’ve worked a lot with enums in Swift. An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code. Let’s go over them in … 

 

Implementing Siri support using NSUserActivity

Siri support can be added using an Intent and an IntentUI extension. This adds quite some overhead and is not always the easiest way in a big project, as you need shared logic between the main app and the extension. A much easier way to implement Siri support is by using NSUserActivity. Asking Siri to … 

 

Authentication with signed requests in Alamofire

With almost 30.000 stars on Github, you can tell that Alamofire is a popular framework to use for iOS and Mac projects. It makes network implementations easy to do and allows us to sign requests using a RequestAdapter for authentication. Signing requests for authentication API’s often require you to sign requests using for example JSON … 

 

App Store Connect API adoption with use case examples

The new App Store Connect API was announced during WWDC 2018 and makes it possible to write applications for App Store Connect. It includes endpoints for the following areas: TestFlight. Manage beta builds of your app, testers, and groups. Users and Access. Send invitations for users to join your team. Adjust their level of access … 

 

Custom Operators in Swift with considerations for readability

Custom operators in Swift create extensions on existing types and can be great for readability improvements if used correctly. Considerations with custom operators For code solutions in your project, you’re probably more likely to define a custom method instead of a custom operator. With the right knowledge and considerations, you can easily create more readable … 

 

Measure the performance of code in Swift

It’s important in any type of programming language to know how to measure the performance of code as there are many different ways to write solutions and not every solution is as performant as the other. If a piece of code turns out to be slow in, for example, the results of the Time Profiler … 

 

Performance, functional programming and collections in Swift

Functional programming is often done in Swift and so easy that it could easily hit performance. Iterating over large collections and performing actions like filter or map is common and should be used wisely. Performance is often decreasing when these methods are combined, like a filter followed by first. A list of best practices. Prefer …