Tag: swift

Property Wrappers

This year’s WWDC was packed with new stuff for Swift developers, and one of them is property wrappers, formerly known as property delegate. Actually we knew about property delegate before WWDC, as there was a proposal in Swift.org a few months ago (you can read it at this link) but we didn’t know about SwiftUI

Continue Reading →

Networking example with Combine

This is the second post about Combine, after my quick introduction you can find here http://www.gfrigerio.com/combine-first-example/I’m using the same GitHub project https://github.com/gualtierofrigerio/CombineTest but this time I’m focusing on networking, with a similar example to the one I used for my series of posts about Future&Promise, RxSwift and AlamoFire. I’ll build the same table view controller

Continue Reading →

Combine first example

This is the first of a series of posts about the new stuff announced at WWDC 2019. First of all let me tell you that it was one of the best WWDC in years, maybe even better than 2014 with the introduction of Swift. A new declarative UI framework was on my wish list, and

Continue Reading →

Moya and Alamofire

As I was playing with my GitHub project about networking I thought it would be interesting to try some different ways to implement the RESTClient protocol. In this article I’m going to show how I used Alamofire and then Moya (which itself uses Alamofire) instead of my custom network layer based on URLSession. I’m going

Continue Reading →

Callbacks vs Promises

Most of the apps we write rely on some sort of data fetching from the network. It can be our backend, or some public API, but we need to get data and we can only to is asynchronously. This is true for networking, but it isn’t the only case. In this article I’ll stick with

Continue Reading →

Show a PDF

Showing PDFs is pretty common for an iOS app. It could be a privacy policy document, an invoice, a flyer the company distributes on paper and via its app, a magazine.There are three possible ways of displaying a PDF. The simplest is to use a Webview. Just like loading a local page, or a remote

Continue Reading →

Barcode scanner

After a few projects made for fun, and for learning, I decided to publish something useful as a CocoaPod: a barcode and QR code scanner. I worked on a similar feature for an app available in the App Store in Objective-C, and decided to rewrite it in Swift to make it available on GitHub. https://github.com/gualtierofrigerio/GFBarcodeScanner

Continue Reading →

Testing in Xcode

I don’t think I need to write about the importance of testing. We all know it is critical to add some testing to the code, so we refactor code, add new functionalities, fix bugs and check that the existing stuff didn’t break. Maybe writing tests isn’t the most exciting part of the job, but it

Continue Reading →

Building a fitness app

In this article I’m describing the GitHub project FitnessExample you can find here: https://github.com/gualtierofrigerio/FitnessExampleThe main topic is communicating between iOS and watchOS, but I thought I could introduced some HealthKit stuff as well as fitness is a very popular category of watchOS apps. I’ll update the article as I add functionalities to the project, the

Continue Reading →

Building an image gallery app

I’ve just committed a project on GitHub for an app I’d like to make for myself. The idea is to show a hierarchy of images, organised in folders, via a table view for a quick preview and then in a scroll view once I select a particular folder. https://github.com/gualtierofrigerio/FolderImageViewer The idea is to show pictures

Continue Reading →

Adding maps to your app

I recently put a sample project on github for using Apple Maps on an iOS application as I wanted to play with Core Location and Maps since I only dealt with Google Maps via Javascript in my existing apps. Here is the link to the project: https://github.com/gualtierofrigerio/GFMapKitWrapper I’ll eventually make it available on CocoaPods so

Continue Reading →

Apple Push Notifications

Here’s a quick guide to implement Push notifications on iOS. Every now and then I need to implement push notification and I always forget how to create the certificate and convert it to use with python, so this guide will be helpful to the future myself and hopefully to some fellow developers 😉Actually, creating the

Continue Reading →