Image for post
Image for post

Year 2020 is gonna be remembered as a milestone for information technology, pretty much as 2007 was a milestone for mobile telephony.

Tim Cook’s Apple has succeeded, once again, marking an historical step forward in the world of computing. I don’t think I’m exaggerating comparing the M1 introduction to the iPhone historical presentation that everyone here surely remember.

Certainly, times and actors are much different but the final result (and execution) is blowing away, the same way.

Intel will have to rearrange many of its (prehistorical) timelines in order to try to close the gap. Still, a comparison to 2007 comes naturally to me, like when Blackberry was suddenly ousted from the podium in a sudden and almost unexpected way — only for them, who did not want to see beyond their nose. Today’s Intel has an awkward production pipeline able to create just foot warmers; I don’t want to appear biased or whatever, but this is pretty much resembling reality of things, by now. …

Image for post
Image for post

Ritengo che il 2020 si appresti ad essere ricordato come una pietra miliare nel mondo dell’informatica. Come il 2007 fu una pietra miliare nel mondo della telefonia mobile.

Apple sotto la direzione di Tim Cook è riuscita, ancora una volta, a segnare un passo in avanti storico nel mondo delle nuove tecnologie. Non credo di esagerare paragonando l’introduzione degli M1 all’introduzione dell’ iPhone.

Intel dovrà riorganizzare molte delle sue timeline — preistoriche — per poter tentare di ridurre la distanza tecnologica che li separa da Apple. Mi viene naturale un paragone al 2007 quando Blackberry fu spodestata dal podio dei telefonini in maniera repentina e quasi inaspettata (solo per loro, che non volevano vedere oltre il loro naso). Così adesso, Intel si trova con una elefantiaca pipeline di produzione che riesce solo a creare scaldini. …

Image for post
Image for post

Building a custom TextField with UIViewRepresentable

At a glance, when I first tried SwiftUI after the WWDC19 introduction, one of the biggest concern was certainly related to the TextField object: there was no way to dispose the keyboard, nor a way to move the focus from one TextField to another.

probably, some details were not yet ready during the initial presentation.

iOS13 beta2, along with many other improvements, seems to solve at least in part the problems related to the TextField: when the enter key is pressed, the keyboard is now dismissed correctly. There are no clues, however, about a mechanism to change the focus between multiple TextField(s) within the same View container. …

Image for post
Image for post

in less than 160 rows

Today we will try to build a TicTacToe game in less than 160 lines with SwiftUI.

SwiftUI is Apple’s new declarative framework that promises to supplant its brother UIKit in the near future.

Let’s open Xcode 11.

In these hours the beta2 came out together with macOS catalina beta2. I strongly advise you to install both of them, since we have noticed an overall remarkable improvement in performance as well as an improved Xcode responsiveness in all respects.

Once opened Xcode, we will create a new project, let’s name it TicTacToe and make sure that the tick in SwiftUI is enabled. …

Image for post
Image for post

Una sguardo d’insieme al futuro del personal computer

Avevo deciso di non parlare ed esprimere commenti sul nuovo iPad Pro sin dalla sua prima uscita. In fondo, pensavo si trattase dell’ennesima mossa commerciale di una Apple con al comando Tim Cook – abile uomo d’affari e solo lontanamente visionario – che mira al profitto ed alla vendita in un segmento commerciale oramai saturo. No, parlarne avrebbe solo alimentato il brusio dei blogs e dei fanatici, in un modo o nell’altro.

Mi sbagliavo. Questo prodotto merita tutta la nostra attenzione per una serie di ragioni che proverò a raccontarvi.

Andiamo per ordine. Il mercato dei tablet è saturo ed in discesa vertiginosa. KGI, sostiene che insieme ad iPhone contribuirà ad un calo mai visto, durante il periodo 2016/2020, delle vendite di dispositivi iOS. Sarà anche vero, ma questo non significa che non ci sia spazio per innovare. …

Image for post
Image for post

What to expect from the new Apple framework

SwiftUI certainly marks the beginning of a new era in Apple’s programming history. In the last years we have witnessed the proliferation of frameworks based on the concept of declarative interfaces and reactive programming; the web is a prime example of this phenomenon, but there are other notable examples in the field of mobile development. We are constantly amused with marketing messages that state how:

“maintaining a single codebase for all platforms is the best way to increase business productivity and provide effective solutions to our customers.”

React Native (Facebook) and Flutter (Google) are an excellent example of this proposition. It is not the purpose of this article to make a comparative analysis of these technologies; the point for which these two examples have been cited is to show how the software trend of recent years is moving in different directions from those we have been used to, up to now. …

One of the most interesting tech trend of the last year was for sure Augmented Reality. All the big have done something related to it, including Apple. They spent a lot of resources and time dealing with this topic and as Tim Cook said:

“…Augmented reality could be the next big thing…”

If 2017 was the milestone year for the introduction of a complete framework that deals with AR, the 2018 is for sure the maturity year for this technology following the introduction of ARKit2.

A lot of things have changed in favour of usability, maintanability and simplicity: all things that could help a lot spreading a technology to the mass. The rest of the article is about my personal experience with the new ARKit framework underlining the improvements and differences between iOS11 and iOS12. As any good dev article, we need a case study to deal with in order to better explain the topic. …

Image for post
Image for post

CloudKit has a strong emphasis on users privacy and security. Since one of the main concern for my last work - Lookii - was about users privacy, it was a good chance to investigate in deep about the real potential of the framework.

As of iOS10, CloudKit comes with a built-in feature related to sharing private data among participants on a container, namely CKShare. Unfortunately, there are very few articles about this topic on the internet and Apple documentation does not go in deep with advanced topics. All the relevant articles that I cited in the footnotes cover the basic flow of CloudKit sharing with some interesting variants that, however, didn’t fit exactly my case. I will not cover the basics, for that I will remand to the footnotes. …

Image for post
Image for post
Stored properties and extensions — A pure Swift approach

One of the most common question regarding swift extensions is about stored properties. How many times have you wished a stored property within your last-super-cool extension in order to parametizer some behaviours?

As you may know Swift does not allow stored properties into extensions. That’s by design: “Extensions may not contain stored properties.”

The most common newbie error is try to overcome the above by implementing something as follow:

Even the above code will compile with no errors, you will realize sooner that it is completely wrong; in fact, the cycling reference to the computed property will loop your code until the heap will be saturated by almost identical calls. …

Quest’articolo vuole essere una breve guida introduttiva su come creare un accessorio compatibile con HomeKit sfruttando componentistica di riuso ed open source. Alla fine dell’articolo, se avrete seguito correttamente tutti i passi, potrete giocare con un telecomando per il vostro cancello automatico di casa comandabile ed azionabile con Siri / HomeKit. Come bonus, avrete la possibilità di aggiungere un sensore ambientale di umidità/temperatura.


1x Raspberry PI3
1x Arduino YUN (opzionale)
1x Telecomando cancello automatico RF 433Mhz
1x Transistor NPN
1x Resistenza 2.2k
1x Qualche cavo
1x DHT22 (opzionale)
5x Pazienza

HomeKit è il protocollo di Apple a cui gli sviluppatori ed aziende che creano hardware e dispositivi per la domotica devono aderire se intendono essere compatibili con l’assistente vocale Siri e l’applicazione Home installati di default su tutti i nuovi dispositivi iOS. …


Costantino Pistagna

 advocate •📱architect

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