Kristaps Grinbergs iOS, tvOS, watchOS, macOS in Swift

Using GraphQL in iOS with Swift

28 Aug 2019

GraphQL is an alternative to the commonly used REST API approach. When using GraphQL you only get one single endpoint to the server and through that endpoint you need to specify the exact data you need. It was created by Facebook in 2012 and open-sourced in 2015.

Using GraphQL in your Swift applications is not that hard. The easiest way is to use Apollo iOS client which recently has seen a lot of great improvements and bug fixes. Apollo iOS is a strongly-typed, caching GraphQL client for iOS, macOS, iPadOS, watchOS, and tvOS. It is written in Swift programming language.

Websockets in iOS 13 using Swift and Xcode 11

24 Jul 2019

Websockets in iOS 13, macOS 10.15, tvOS 13, watchOS 6 and Mac Catalyst have gained first-class citizen status in networking stack. Apple has finally added support in URLSession and for lower level in Network.framework for their platforms.

This time we will focus on implementing Websockets using URLSession capabilities.

WWDC 2019

26 Jun 2019

This year I finally had a chance to attend WWDC (Apple Worldwide Developers Conference). It has always been my dream to go there and see the Keynote, conference and all other events with my own eyes.

UIView vs CALayer

03 May 2019

Here’s something useful to know - UIView’s are backed by CALayer’s. Layers offer a lower-level interface to the visual content. When we need more flexibility or performance, we can go to layer level.

What is (Core) Animation

27 Mar 2019

Animation has been an important part of the Mac OS X user interface since the very beginning. You’ve probably seen the Genie effect, which occurs when you minimize an application, so many times that you hardly notice it anymore.

Apple integrates animation into its operating systems and applications, and it is becoming so commonplace that users are starting to expect it.

Core Animation is a group of features that makes it easy to build animated user interfaces for the Apple ecosystem devices like iPhone, iPad, Apple TV, and Mac.

Animating shapes in iOS

12 Feb 2019

Animating a UIBezierPath drawing is a pretty trivial task. But how to animate shape morphing, i.e. make one shape change into another? (For instance, morphing a triangle into a square.) To accomplish this, we need to use CAShapeLayer and animate its properties using Core Animation capabilities.

Websockets in iOS using Swift

05 Jan 2019

WebSockets allow for extremely fast two-way networking communication, which lets you send and receive updates quicker and more often, not to mention securely. WebSocket is a communication protocol that uses sockets, providing duplex communication over a single TCP connection. It was standardized by the IETF in 2011 and is a different protocol from HTTP.

WebSockets are widely used in chat apps, streaming real-time notifications, and stock prices.