Sign in

Tony Trejo

In this post I will be talking about the Api and Model used in the Home view and Market view of the Binance App.

Before I start cloning that App maybe you need to know what is an API.

What is an API?

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Binance you’re using an API.

It is common to find APIs provided by some Apps, fortunately for us Binance provides his own API documentation.

API Documentation

What is Binance?

Binance is one of the largest and most…

In this post I will be using Generics to refactor a common mistake creating a Network layer, don’t do this on your code.

Photo by @zgc1993

Before I start talking about the Network layer let's talk a little bit about generics.

So what does Apple say about generics?

Generic code enables you to write flexible, reusable functions and types that can work with any type, subject to requirements that you define. You can write code that avoids duplication and expresses its intent in a clear, abstracted manner.Generics in Network Request

My own definition of generics would be:

A generic it is just a…

In this post I will be applying three REAL use cases for Closures, these closures are used everywhere in any application.

  • Asynchronous Callback (URLSession, DispatchQueue, DispatchGroup)
  • Synchronous Callback (Append String, Sort)
  • Property Callback (Network, Append String, Sort)
Photo by Nicolas Lobos @lobosnico

What is a Closure?

Closures are self-contained blocks of functionality that can be passed around and used in your code.

A simple definition can be a closure is a function without the keyword func.

With that being said let’s start with some usual cases.

  • Case No 1 “Closure used in an Asynchronous Callback”

This is one of the most common use cases of a closure that is…

In this post I will be talking about the implementation of the VSAccountManagerDelegate, this is the last part of the AppleSSO series, enjoy it.

Photo by Vasily Koloda @napr0tiv

What the documentation says?

The methods you use to respond to authentication view controller requests.

That means that we are almost done with the AppleSSO implementation.

Let’s first update the UI, we need to include two TextViews and a new button.

Your UI would be something like I show you below.

In this post I will be talking about protocols in Swift and the things you should know about protocol applied to classes, structs and enums.

What is a protocol?

A protocol is something that defines a particular use case. The protocol can defines methods, properties and other necessary pieces used by whoever complies with that protocol.

Let’s create different types of protocols, without any property or method.

protocol SimpleProtocol { // 1
protocol ClassProtocol: class { // 2
protocol AnyObjectProtocol: AnyObject { // 3
protocol AnyProtocol: Any { // 4
protocol ObjectProtocol: NSObject { // 5
@objc protocol ObjcProtocol { // 6
  1. This is the default syntax of one protocol.
  2. This is a protocol that inheritance from class, so for that reason this…

In this post I’ll be talking about classes and structs also we will use playgrounds to show you those differences.

First you will to know how use playgrounds, If you want to know how to use Xcode Playgrounds the links below can help you with that.

What is a Swift Class?

In simple words a class is something written by a programmer and defines properties and actions. Those properties and actions will be used when you create an instance of this class, usually called object.

Let’s create a CrytoExchange class.

// MARK: CrytoExchange classclass CrytoExchange { // 1   // MARK: Properties  let

In this post I will be talking about how to install Xcode and previous version for develop iOS applications.

First of all you will need a Mac computer, I’ll recommend you check the Apple’s site and see what are the computers that you can buy.

Note: I think a good investment would be at least MacBook Pro 13” or an iMac, you can buy another cheaper version but you will have a better experience working with them.

The IDE (Integrated Development Environment)

So now that you have your computer you need to download the Xcode that is the IDE used…

In this post I will be talking about how to check the access status using the VideoSubscriberAccount framework.

One of the important things to do when you want to implement AppleSSO is import VideoSubscriberAccount in your project, that framework is already provided by Apple, so you just need to import that framework like this.

import VideoSubscriberAccount

Then you need to create an instance of VSAccountManager.

That object coordinates your app’s authentication requests with a TV provider’s authentication service.

That framework provides a method to knows what is the current status of the VSAccountManager,

open func checkAccessStatus(options: [VSCheckAccessOption : Any] =…

In this post, I will be talking about why you should try to be an iOS Developer.

There are tons of opportunities to find a job as an iOS Developer. I know the current situation is very difficult for everybody.

I was thinking about how I can help others to learn something new so I will create an iOS Course based on the requirements that I found in some job offers.

First I want to show you that investing your time in learning iOS Development opens up many opportunities for you. …

In this post I will be talking about how to create a builder that conforms the sign in foundations for User-Password, Facebook, Google process.

What is a builder pattern?

The builder pattern is a design pattern (creational pattern) that allows us to create complex objects using sequence of actions.

With that being said let’s code an example.

The example

The goal of this example will be create a generic sign in instance that allows us to create different types of Sign in process, those are listed below:

  • UserSignIn

This sign in contains username, password and session properties.

  • FacebookSignIn

This sign in contains Facebook token and api key properties.

  • GoogleSignIn

This sign in contains Google token, api key and host properties.

First we need to define a protocol that contains all the…

Tony Trejo

Experienced Software Engineer with 12+ years of experience.

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