When building app using SwiftUI you can come across some limitations it has. One of such limitations is that we cannot open another view full screen using .sheet modifier.

It’s very sad. But here is workaround I found and would like to share with you!

Suppose we have tab view…

Working with collection view may seem to be complicated. One of the main reasons developers choose table views over collection views is that you don’t have to “suffer” with layout, you only specify the height of a row and that’s it. Moreover, it’s pretty straightforward how to make table view…

Problem

I love building reusable components based on protocols, that can provide additional functionality for adopters. And sometimes I want to add for example gestures on UIView subclasses adopters.

So I have to add method that adds gesture recognizer and sets it target and action to handle it. Remember that action…

Hello! Here we are going to create a super simple list using things described in part 1. In the end, we will have this screen done.

Yeah, it doesn’t look cool, but the article is not about design :)

Download starter project:

I have already setup all the needed UI…

Hello! Using table and/or collection views (I will name them lists throughout the article) is very common for any iOS app. If you care about following programming principles, you are probably wondering how can ViewModel be agnostic about View in its list representation. …

Recently I was to implement certificate-based authentication for enterprise app. When I read documentation for integrating AppConnect SDK (MobileIron’s mobile SDK for wrapping an app), there was mentioned that you do not have to do anything to adopt certificate based authentication to your enterprise services. …

Recently I was working on client certificate-based authentication. The app is for enterprise, so is distributed through MDM. In my case it was MobileIron. Thus the app is using MobileIron mobile AppConnect SDK for iOS. The problem rose up when I managed to properly set the app configuration through MobileIron Core, but authentication still failed.

The process of authentication was driven by numerous redirects. Every next redirect response contained Set-Cookie header with cookies that were obviously important for next request caused by the response.

It is appeared that URLSession — for some reason I do not understand — loses cookies when handling redirects.

The workaround is to implement

urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void)

method of URLSessionTaskDelegate like this:

Do not lose your cookies! As I did 🤷🏻‍♂️
Hope it will help someone!

I have been developed iOS applications within MVVM architecture for a long time and every time I start new project I try to reduce distance between “perfect” MVVM and my MVVM.

This time I try to get closer to what I saw when searched for original MVVM applications within WPF…

There are a lot of articles about implementing state-machine in iOS application, but they do not take into consideration one iOS specific thing — transition to a state may take some time to complete and while it’s completing transition to another state may not be possible.

Consider the following situation.
Your…

It’s not uncommon to have alerts in your app and every developer implements showing alerts in some way. I want to share my approach to showing them when app’s architecture is MVVM.

For binding let’s use Bond framework.

AlertModel

Let’s create simple alert model which will be a view model of…

Isa Aliev

iOS-Developer from Russia

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store