background preloader

To Read

Facebook Twitter

Going Without the Flow - Exploring Collection View Layouts. Introduction Collection views are extremely versatile - there’s even speculation that the venerable UITableView will be soft-deprecated in favour of its more flexible and powerful cousin.

Going Without the Flow - Exploring Collection View Layouts

But this versatility comes with a price - collection views, and particularly collection view layouts, can become complicated, and the official documentation for some of the more interesting areas is a little… sparse. Apple frequently tells you to use directly or subclass the flow layout. The flow layout does a lot of heavy lifting for you when you’re dealing with a flexible number of arbitrarily sized items that need to make room for each other. This covers a lot of use cases, and delivers you the following advanced features for free, or almost free: However, getting things for free usually has a price - in this case, the price is a lack of decent understanding of what a collection view layout does or how it works. Custom Layouts. WWDC19: Getting Started with Test Plan for XCTest – XCBLOG. Apple’s WWDC conference is bringing some great features for developers.

WWDC19: Getting Started with Test Plan for XCTest – XCBLOG

Xcode11 packed up with some amazing features too. Release notes of Xcode have all the latest enhancements. One of the great features announced this year was Test Plan for XCTest and Xcode UI tests. In this post, we will cover how details of how Test Plan feature will work with XCTest. Functional Programming in Swift: an Unusual yet Powerful Paradigm. How to Implement Server Side Event Driven Push Notifications in iOS - Medium. Krzysztof Zabłocki - Testing iOS Apps. Writing tests in iOS apps is a touchy subject.

Krzysztof Zabłocki - Testing iOS Apps

Not everyone is so privileged to be able to write tests full-time, for different reasons. Some people have full control over their development process and choose not to write tests, maybe because they have had a bad experience with it or they just don’t see the value in them. I would argue that if you are part of a smaller team, tests can even be more helpful than in big corporations. A big corporation might have dedicated QA team, but if you are one of 2 developers, then you are often responsible for ensuring quality and reliability of your work, its considerable pressure because each feature you write might break something else in your app. Practical MVVM + RxSwift – Flawless iOS. While implementing the MVVM design pattern with RxSwift, we will use all the advantages of this approach in a real project.

Practical MVVM + RxSwift – Flawless iOS

We will work on a simple app that shows a list of Linkin Park’s albums and songs in the UICollectionView and UITableView (R.I.P Chester🙏). Let’s begin! Child View Controllers I’d love to follow Reusability Principle while building our app. Encapsulating Domain Data, Logic and Business Rules With Value Types in Swift - Khawer Khaliq. This article shows how we can leverage the power of Swift value types to encapsulate domain data, logic and business rules.

Encapsulating Domain Data, Logic and Business Rules With Value Types in Swift - Khawer Khaliq

It keeps classes focused on maintaining the identity of entities in the domain and managing state changes through their life cycles, helping to deal effectively with domain complexity and facilitating efficient, easily testable and concurrency-friendly programs. Designing with value and reference types Swift offers a rich collection not just of reference types, in the form of classes and closures, but also of value types, in the form of structs, enums and tuples. Enums, tuples and closures are more specialized in what they do, so structs and classes are the most commonly used value and reference types respectively. To be able to program effectively with value and reference types, it is vitally important to understand the difference between value and reference semantics. Values are used in almost all programs. Representing immutable state. Reasoning about protocols · Swift in Depth. Written by Tjeerd in 't Veen on January 01, 2019 In this article, I’d like to clear up some confusion that may arise when dealing with Swift’s protocols.

Reasoning about protocols · Swift in Depth

Let me preface this by saying that I think the engineers of Swift do a tremendous job at making sure that Swift hides complexities from us as developers. Writing Re-Usable iOS UI Code with Generics: An exploration of a view system architecture. 2.

Writing Re-Usable iOS UI Code with Generics: An exploration of a view system architecture

View Injection Design So what problems do we need to solve if we want to create a resilient UI architecture that is able to keep up with changing demands? Tight coupling with superviewBoilerplate layout codeTo much view subclassing that leads to near duplicate view classes to avoid unwanted properties A common practice in creating an application’s data layer is to use dependency injection. You might have seen this before when using MVVM and generics in the form of a ViewModelController.

On Using SQLite and FMDB Instead of Core Data · objc.io. I can’t in good conscience tell you not to use Core Data.

On Using SQLite and FMDB Instead of Core Data · objc.io

It’s good and getting better, and it’s understood by many other Cocoa developers, which is important when you add people to your team or when someone else takes over your app. More importantly, it’s simply not worth the time and effort to write your own system instead. Use Core Data. Really. Swift MVVM Tutorial: A Static Immutable Pattern for iOS Apps. CreateML: Start Your Adventure in Machine Learning with Swift. Best Practices for Building Swift Classes. Understanding Operation and OperationQueue in Swift. There are more ways than one to do concurrent operations on iOS.

Understanding Operation and OperationQueue in Swift

In this article, we’ll cover how to use Operations and OperationQueue to execute concurrent operations. There’s a lot to be said (and written) about concurrency on iOS and I don’t really want to bore you to death by writing a massive article about it, so I’ll focus here on Operations because chances are these will cover most of your needs for concurrent operations. We’ll touch a bit on GCD because sometimes you just need to dig in deep and do it yourself. This is just a fancy way of saying ‘doing stuff at the same time’.

The iPhone is capable of executing multiple threads at the same time. Just remember one thing – on your iOS device you’ll see two types of queues; the main queue, and everything else. All your UI updates should be performed on the main queue and you should do as much work as possible in the background, which is sometimes referred to as ‘off the main queue’. Parse operation is even simpler: Dejan. Container View Controllers Revisited – Flawless App Stories. In a previous post I discussed the use of container view controllers in iOS as they relate to composition.

Container View Controllers Revisited – Flawless App Stories

In this post I would like to expand on that concept through illustration in a more complex app with coordinators and multiple content screens. Let’s get started! Just in case you did not read the previous post or just need a quick refresher on view controller containment we’ll review the basics. Custom container view controllers have been around since iOS 5 and were provided by Apple, in part, to prevent what they saw as abuse of view hierarchies in apps. Faster Together: Uber Engineering’s iOS Monorepo. Over the past few years, Uber has experienced a period of hypergrowth, expanding to service over 550 cities worldwide. To keep up, our mobile team also had to grow. In 2014, we had just over a dozen mobile engineers working on our iOS apps. Today, our mobile team numbers in the hundreds. Secure communication in apps (SSL) - Liasoft. Understand security risks in apps in our last article.

We reported on the general security risks in apps to gain an understanding of the topic. Today we write about Safe communication in apps (SSL). As in our first article Why, is app security important? Mentions, the ease of use of SSL does not necessarily mean that apps and services are securely implemented. Engineering the Architecture Behind Uber’s New Rider App. Deep dive into Swift frameworks - The.Swift.Dev. Learn everything about Swift modules, libraries, packages, closed source frameworks, command line tools and more. TL;DR: please read the article 🤓, but I have some examples on gitlab as well. Basic definitions First of all you should have a clear understanding about the basic terms. If you already know what's the difference between a module, package, library or framework you can skip this section. However if you still have some mixed feelings about these things, please read ahead, you won't regret it Package. How To Control The World - Stephen Celis.

A taste of MVVM and Reactive paradigm. I like Swift, like many other object oriented programming languages. Swift allows you to represent real world objects that have some characteristics and can perform some action. I tend to think of an app as a world where each object is a person. They work and communicate. If a person can’t do the work alone, he needs to ask for help. Take a project, for example, if the manager has to do all of the work by himself, he will go crazy. How to refactor your app to add unit tests – Hacking with Swift. Part 1 in a series of tutorials on modern app infrastructure: I'm writing one new, free tutorial every day until WWDC – click here to see the full list! Every developer has, at some point, written terrible code. It might have been because you were early in your career, it might have been because you didn’t know any better at the time, it be because you were under pressure and had to rush, or it might have been for any number of other reasons.

I’ve already written extensively about ways to fix massive view controllers (see here, here, and here), but in this tutorial series I want to focus on app infrastructure – tools that help you write better software by automating tasks. To make things as realistic as possible, I built a Swift project that contains a number of problems that we’ll investigate here and across the following tutorials in this series. To get started, download the project from GitHub here. If you’ve written this kind of code yourself, relax – you’re not alone. Wrapping a C library in Swift (Part 1) – Shopify Mobile. Handling Enormous Collection Types in Swift. JPEG Decoding with the Best — Luke Parham. iOS remote push notifications in a nutshell – Flawless App Stories. What are remote Push Notifications? Well if you ask the folks at Apple, they will probably direct you to this page on their website where they describe notifications as follows: Apple Push Notification service (APNs) is the centerpiece of the remote notifications feature.

It is a robust, secure, and highly efficient service for app developers to propagate information to iOS (and, indirectly, watchOS), tvOS, and macOS devices. Friends Don't Let Friends Render Offscreen — Luke Parham. In this example you can see that the native Twitter app is doing some pretty aggressive offscreen rendering while loading the stretchy profile header. The video is (unfortunately) a real-time capture of the animation on my iPhone 5.

As you can probably guess, this is not an ideal experience for people using your app. Round 2 Day 90 of 100 Days of Code. Today and yesterday, I setup and used Fastlane to automate screenshots and upload to testflight. The process was simple and complicated at the same time, and I kept hitting roadblocks. Getting started with Moya – Flawless App Stories. Building Fluid Interfaces – Nathan Gitter. Protocol Based Generic Networking using JSONDecoder and Decodable in Swift 4. Swift 4 has been out for a while and XCode 9.2 has been released during this week (December 2017), no many dramatic updates for Swift 4 but a few new tools that we can use to write cleaner and reusable code, in this post we are going to mainly focus on JSONDecoder and the Decodable protocol that helps with making very easy to parse JSON. We are going to create a generic API that you can reutilize for any model, because what I want to highlight on this project is how to create the networking layer we will only going to parse the JSON and print it as models in the console.

As a bonus, I will add a second part to this project where we will use protocol extensions to create the UI using XIBS. Building Swift 4 frameworks and including them in your apps (Xcode 9) – iOS Brain. Let’s talk about Swift 4 frameworks, one method for packaging, reusing, and sharing code. We’ll build our own framework and then include it in our own app. We could’ve talked about static libraries, but frameworks offer more advanced features — and will let us expand on code maintainability options in future discussions. (If you want to have that static versus dynamic library discussion, read this excellent article, but we won’t be debating the topic herein.)

An MVC Approach to Loading, Error and Empty View Controllers. There’s been a lot of back and forth recently about Apple’s style of MVC. The New Swipe Right with Swift. CALayer: Kite Compositor: A Better Way to Animate. Krzysztof Zabłocki - Metaprogramming in Swift (DevFest Baltics) Basics of parallel programming with Swift – Flawless App Stories. Combining Swift/Kotlin with C/C++ Rob Napier - Practical Security. Core Data Migrations: Can we do Better?

Error Handling Made Easy. Comparative Asynchronous Programming. New iOS Software Architecture: 4V Engine - Marco Santa Dev. Debugging Swift code with LLDB – Flawless App Stories – Medium. Map and FlatMap Magic. Erwin Zwart - Writing future proof Swift. Adventures in ARKit (with magic) Clean Swift iOS Architecture for Fixing Massive View Controller. 3D Touch: Bring Your Apps to a New Dimension. Architecting a Robust Color System with Swift. Episode 51 – Playground-Driven Development at Kickstarter · Swift Talk · objc.io. Krzysztof Zabłocki - Metaprogramming in Swift talk. The Two Sides of Writing Testable Code. Document Indexing and App Search in iOS. Functional Programming is taking over UIs with Pure Views. Boost Smooth Scrolling with iOS 10 Pre-Fetching API. Everyday Reactive. Common unit testing techniques on iOS ~ Marisi Brothers. The Recipe for Singletons Removal - Alberto De Bortoli.

A Quick Look at Semaphores in Swift □ – Swiftly Swift – Medium. Refactoring singleton usage in Swift · Jesse Squires. Protocol oriented image picker - The.Swift.Dev. Perfect Forwarding — Content app extensions in iOS 10. Thinking in RxSwift - Code in a suit. Testing an Untested App. The Yin and Yang of Unit Testing in iOS ~ Marisi Brothers. Smooth Scrolling in UITableView and UICollectionView. Testing in Swift: Protocols & View Models. Property-Based Testing with SwiftCheck. Request Behaviors. #Pragma Conference 2016 - Fabio Milano - 'I have a framework idea' - Repeat less, share more. Unowned or Weak? Lifetime and Performance. Incremental Swift. Using Swift in AWS Lambda – Justin Sanders – Medium. Building a User-Centric Security Model in iOS Applications. Swift, Java, Node.js, or Ruby? The Advantage of Server-side Swift. Test Your App On Any Device You Want, Without The Hardware From the Command Line — MobDesign. Extending Xcode 8.

I create iOS apps - is RxSwift for me? Building Reactive Apps with Realm: Episode 1. Turning UIKit Inside Out. John Sundell, Mobiconf 2015. Ash Furrow, Mobiconf 2015. A composable pattern for pure state machines with effects (draft v3) The Easiest Core Data - Alberto De Bortoli. Closures Capture Semantics, Part 1: Catch them all! – Crunchy Development. Memory Leaks in Swift – Flawless App Stories. Making burritos with Swift (or How To Mock Classes You Don’t Control) — COBE. Using Stack Views in Table Cells. How do I build a Network Layer. Grokking Lazy Sequences & Collections. Real World Flux Architecture on iOS · [Thinking inside a large box]; Build Tic Tac Toe with AI Using Swift — Swift Programming. Neural Networks in iOS 10 and macOS.

Protocol oriented loading of resources from a network service in Swift ~ Marisi Brothers. Practical Protocol-Oriented-Programming. Functional Programming, Abstraction, and Names. Protocol-Oriented-Networking in Swift. Russ Bishop - Functors, Applicatives, and Monads in Plain English. SOLID Principles for Android #2: Open/Closed Principle, by Donn Felker.