Tagged with apple

Browse all tags

How to select images using PHPickerViewController with SwiftUI

Selecting images from our iPhone library is needed when changing a profile picture, posting an update, or sharing the photo of your pet. In this post, we are going to look into how to use PHPickerViewController with SwiftUI. Apple announced this view controller at WWDC2020.

Read more

Background Color with SwiftUI

Once you create a SwiftUI view, it has the default background color. White for light mode and black for dark mode respectively. But how to change it to something different? Let's look into that today.

Read more

How to deal with modal views (a.k.a. sheets) with SwiftUI

When presenting a small piece of extra information on the screen, showing a modal view is essential. With UIKit, we could do this with presentViewController:animated:completion: function. However, using SwiftUI, we need to twist our thinking towards using view or environment state, as the modal view is now called a sheet.

Read more

Launch Screen with SwiftUI

Launch Screen is the first interaction that users see when using our apps. That's why investing time in making our app launch screens feel responsive and visually appealing is important. We are playing with the perceived time and it can be a great first impression.

Read more

Use Custom Font with Dynamic Type in iOS apps

A while back we looked into dynamic type with the system font. This time we are going to check out how to use the dynamic type with a custom font in our iOS apps. Apple provides great APIs to make our apps accessible even if we're using custom font styles.

Read more

Mapview with SwiftUI

Finding places, navigating our way, or simply checking what's around - these are essential things that smartphones can help with. This year Apple added maps functionality to the SwiftUI framework. Let's check out how we can use it and what are the current problems.

Read more

Embracing the Dynamic Type

Every year the third Thursday of May is the Global Accessibility Awareness Day. This time I want to focus on Dynamic Type in our iOS, iPadOS, and macOS projects. By implementing font scaling we can improve lives for loads of people with disabilities and impairments.

Read more

Different flavors of WebSockets on Vapor with Swift

Swift on the server lately is getting more traction despite IBM leaving the club. One of the most popular frameworks out there is Vapor. It is built on top of Apple’s SwiftNIO and written fully in Swift programming language. This time we will look into how to work with WebSockets using Vapor framework. We are going to see how to create a client and server using Vapor’s module WebSocketKit and Vapor framework itself.

Read more

NSTimer vs CADisplayLink

NSTimer or just Timer in Swift world is a commonly used way to execute something repeatedly with an interval. For instance, a countdown timer is a perfect example. A hidden gem is CADisplayLink - a special flavor of timer that is linked to the device screen refresh rate. Usually, it is 60 frames per second, but in new iPads, it is 120 frames per second.

Read more

Clearing up after subscribing to Swift WebSockets

Opening and keeping a WebSocket connection alive isn't enough when dealing with it. The connection needs to be closed either from user or sever side. That is mentioned in the official WebSocket protocol.

Read more

Ignorance of the URLRequest cache

Caching and invalidating cache is one of the hardest things in computer science according to Martin Fowler. Recently I was dealing with cache and invalidating it in three of my applications. I had some serious issues with that and wanted to dig deeper. This time we will discuss URLRequest caching strategies and how to use it in your apps. I will share some of my learnings and problems that I found.

Read more

GraphQL Advances when fetching data in iOS with Swift and Apollo SDK

In previous articles, we discussed how to get started with and use subscriptions with GraphQL in iOS (and iPadOS, tvOS, and macOS) using Swift programming language.

Read more

How to use subscriptions with GraphQL using Apollo iOS SDK and Swift

GraphQL main functionality is to fetch and update data from the server. In addition to that subscriptions allow us to listen and to send messages from and to server in real-time. It is similar to regular queries, but the answer will be received when an event happens either on the server or on the client. Apollo iOS SDK library supports subscriptions and it is powered by the Swift WebSocket library Starscream behind the scenes to connect to the server. Let's look at how to set it up and start using it.

Read more

Dark Side of the App Store

Sep 25, 2019

I am an Apple fanboy and I admit that. But one of the most frustrating things in being an app developer is dealing with the App Store review and compliance teams. This time I would like to share my experience with these problems.

Read more

Using GraphQL in iOS with Swift

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.

Read more

Websockets in iOS 13 using Swift and Xcode 11

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.

Read more

WWDC 2019

Jun 26, 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.

Read more