Extending native code with JavaScriptCore

This week there were a lot of articles around the web about React Native and its place in a current iOS dev ecosystem. I was also playing with JavaScript lately, but in somewhat different context - JavaScriptCore. JavaScriptCore is a really great way to make your apps extensible by your…

Going back to the roots

As Roy Marmelstein said in his recent presentation at dotSwift - "We love to be excited". Can not agree more. When we read a blog post that describes the concept or architectural pattern that is somewhat new for us and feels exciting we tend to accept it as…

Adaptive text styles

Textual content is the essential part of any app and text handling in iOS has been improving through last years. Starting with iOS 7 we have dynamic types and text styles, then in iOS 8 we got self sizing cells that help a lot when you want to adopt dynamic…

Inout variables with side effects

Every app has some kind of caching. Let's say our caching strategy is very simple: check if data is in the memory cache and return it if not - make a network call and cache the result when it's done For that you can write code that will probably look…

Frameworks, Keychain, NSCoding and Swift

One of the strategies that we use at HelloFresh to reduce compile time, improve code reuse and overall codebase health is breaking our code into frameworks. We've started with two core layers - domain and network. We broke these layers into four different frameworks: domain, generic API client, implementation of…

Xcode & cross-platform frameworks

Recently I came across an article by Max Howell describing how he had setup PromiseKit project to use just a single target instead of a separate target for each platform. As I have a side-project framework I'm working on I was interested to try this setup. Here is what I've…

Douglas-Peucker algorithm

This post is a part of the series about shapes recognition. This post is also available as a part of a playground. Curve preprocessing. When drawing by hand, especially in a slow manner, we will get a lot of touch points and the resulting curve will contain lots of close…

Freehand drawing

This post is a part of the series about shapes recognition. This post is also available as a part of a playground. Naive implementation of rendering user's freehand drawing is strait forward. We need to listen to touch events from view and construct the path appending lines to each subsequent…